Class AbstractInMemoryStorageReader

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.neo4j.storageengine.api.StorageReader, org.neo4j.storageengine.api.StorageSchemaReader

    public abstract class AbstractInMemoryStorageReader
    extends java.lang.Object
    implements org.neo4j.storageengine.api.StorageReader
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.neo4j.counts.CountsAccessor counts  
      protected org.neo4j.gds.core.cypher.CypherGraphStore graphStore  
      protected org.neo4j.token.TokenHolders tokenHolders  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractInMemoryStorageReader​(org.neo4j.gds.core.cypher.CypherGraphStore graphStore, org.neo4j.token.TokenHolders tokenHolders, org.neo4j.counts.CountsAccessor counts)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.neo4j.storageengine.api.AllNodeScan allNodeScan()  
      void close()  
      boolean constraintExists​(org.neo4j.internal.schema.ConstraintDescriptor descriptor)  
      org.neo4j.internal.schema.ConstraintDescriptor constraintGetForName​(java.lang.String name)  
      java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetAll()  
      java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForLabel​(int labelId)  
      java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForRelationshipType​(int typeId)  
      java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForSchema​(org.neo4j.internal.schema.SchemaDescriptor descriptor)  
      long countsForNode​(int labelId, org.neo4j.io.pagecache.context.CursorContext cursorContext)  
      long countsForRelationship​(int startLabelId, int typeId, int endLabelId, org.neo4j.io.pagecache.context.CursorContext cursorContext)  
      <T> T getOrCreateSchemaDependantState​(java.lang.Class<T> type, java.util.function.Function<org.neo4j.storageengine.api.StorageReader,​T> factory)  
      boolean hasRelatedSchema​(int label, org.neo4j.common.EntityType entityType)  
      boolean hasRelatedSchema​(long[] labels, int propertyKey, org.neo4j.common.EntityType entityType)  
      java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetAll()  
      java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetForLabel​(int labelId)  
      java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetForRelationshipType​(int relationshipType)  
      boolean indexExists​(org.neo4j.internal.schema.IndexDescriptor index)  
      org.neo4j.internal.schema.IndexDescriptor indexGetForName​(java.lang.String name)  
      java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexGetForSchema​(org.neo4j.internal.schema.SchemaDescriptor descriptor)  
      java.lang.Long indexGetOwningUniquenessConstraintId​(org.neo4j.internal.schema.IndexDescriptor index)  
      int labelCount()  
      protected boolean nodeExists​(long id)  
      long nodesGetCount​(org.neo4j.io.pagecache.context.CursorContext cursorContext)  
      int propertyKeyCount()  
      int relationshipTypeCount()  
      org.neo4j.storageengine.api.StorageSchemaReader schemaSnapshot()  
      org.neo4j.common.TokenNameLookup tokenNameLookup()  
      java.util.Collection<org.neo4j.internal.schema.constraints.IndexBackedConstraintDescriptor> uniquenessConstraintsGetRelated​(long[] labels, int propertyKeyId, org.neo4j.common.EntityType entityType)  
      java.util.Collection<org.neo4j.internal.schema.IndexDescriptor> valueIndexesGetRelated​(long[] tokens, int[] propertyKeyIds, org.neo4j.common.EntityType entityType)  
      java.util.Collection<org.neo4j.internal.schema.IndexDescriptor> valueIndexesGetRelated​(long[] tokens, int propertyKeyId, org.neo4j.common.EntityType entityType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.neo4j.storageengine.api.StorageReader

        allocateNodeCursor, allocatePropertyCursor, allocateRelationshipScanCursor, allocateRelationshipTraversalCursor, allRelationshipScan, nodeExists, relationshipExists, relationshipsGetCount, uniquenessConstraintsGetRelated
      • Methods inherited from interface org.neo4j.storageengine.api.StorageSchemaReader

        indexGetForSchemaAndType
    • Field Detail

      • graphStore

        protected final org.neo4j.gds.core.cypher.CypherGraphStore graphStore
      • tokenHolders

        protected final org.neo4j.token.TokenHolders tokenHolders
      • counts

        protected final org.neo4j.counts.CountsAccessor counts
    • Constructor Detail

      • AbstractInMemoryStorageReader

        public AbstractInMemoryStorageReader​(org.neo4j.gds.core.cypher.CypherGraphStore graphStore,
                                             org.neo4j.token.TokenHolders tokenHolders,
                                             org.neo4j.counts.CountsAccessor counts)
    • Method Detail

      • indexGetForSchema

        public java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexGetForSchema​(org.neo4j.internal.schema.SchemaDescriptor descriptor)
        Specified by:
        indexGetForSchema in interface org.neo4j.storageengine.api.StorageSchemaReader
      • indexesGetForLabel

        public java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetForLabel​(int labelId)
        Specified by:
        indexesGetForLabel in interface org.neo4j.storageengine.api.StorageSchemaReader
      • indexesGetForRelationshipType

        public java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetForRelationshipType​(int relationshipType)
        Specified by:
        indexesGetForRelationshipType in interface org.neo4j.storageengine.api.StorageSchemaReader
      • indexGetForName

        public org.neo4j.internal.schema.IndexDescriptor indexGetForName​(java.lang.String name)
        Specified by:
        indexGetForName in interface org.neo4j.storageengine.api.StorageSchemaReader
      • constraintGetForName

        public org.neo4j.internal.schema.ConstraintDescriptor constraintGetForName​(java.lang.String name)
        Specified by:
        constraintGetForName in interface org.neo4j.storageengine.api.StorageSchemaReader
      • indexExists

        public boolean indexExists​(org.neo4j.internal.schema.IndexDescriptor index)
        Specified by:
        indexExists in interface org.neo4j.storageengine.api.StorageReader
      • indexesGetAll

        public java.util.Iterator<org.neo4j.internal.schema.IndexDescriptor> indexesGetAll()
        Specified by:
        indexesGetAll in interface org.neo4j.storageengine.api.StorageSchemaReader
      • valueIndexesGetRelated

        public java.util.Collection<org.neo4j.internal.schema.IndexDescriptor> valueIndexesGetRelated​(long[] tokens,
                                                                                                      int propertyKeyId,
                                                                                                      org.neo4j.common.EntityType entityType)
        Specified by:
        valueIndexesGetRelated in interface org.neo4j.storageengine.api.StorageReader
      • valueIndexesGetRelated

        public java.util.Collection<org.neo4j.internal.schema.IndexDescriptor> valueIndexesGetRelated​(long[] tokens,
                                                                                                      int[] propertyKeyIds,
                                                                                                      org.neo4j.common.EntityType entityType)
        Specified by:
        valueIndexesGetRelated in interface org.neo4j.storageengine.api.StorageReader
      • uniquenessConstraintsGetRelated

        public java.util.Collection<org.neo4j.internal.schema.constraints.IndexBackedConstraintDescriptor> uniquenessConstraintsGetRelated​(long[] labels,
                                                                                                                                           int propertyKeyId,
                                                                                                                                           org.neo4j.common.EntityType entityType)
        Specified by:
        uniquenessConstraintsGetRelated in interface org.neo4j.storageengine.api.StorageReader
      • hasRelatedSchema

        public boolean hasRelatedSchema​(long[] labels,
                                        int propertyKey,
                                        org.neo4j.common.EntityType entityType)
        Specified by:
        hasRelatedSchema in interface org.neo4j.storageengine.api.StorageReader
      • hasRelatedSchema

        public boolean hasRelatedSchema​(int label,
                                        org.neo4j.common.EntityType entityType)
        Specified by:
        hasRelatedSchema in interface org.neo4j.storageengine.api.StorageReader
      • constraintsGetForSchema

        public java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForSchema​(org.neo4j.internal.schema.SchemaDescriptor descriptor)
        Specified by:
        constraintsGetForSchema in interface org.neo4j.storageengine.api.StorageReader
      • constraintExists

        public boolean constraintExists​(org.neo4j.internal.schema.ConstraintDescriptor descriptor)
        Specified by:
        constraintExists in interface org.neo4j.storageengine.api.StorageReader
      • constraintsGetForLabel

        public java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForLabel​(int labelId)
        Specified by:
        constraintsGetForLabel in interface org.neo4j.storageengine.api.StorageSchemaReader
      • constraintsGetForRelationshipType

        public java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetForRelationshipType​(int typeId)
        Specified by:
        constraintsGetForRelationshipType in interface org.neo4j.storageengine.api.StorageSchemaReader
      • constraintsGetAll

        public java.util.Iterator<org.neo4j.internal.schema.ConstraintDescriptor> constraintsGetAll()
        Specified by:
        constraintsGetAll in interface org.neo4j.storageengine.api.StorageSchemaReader
      • indexGetOwningUniquenessConstraintId

        public java.lang.Long indexGetOwningUniquenessConstraintId​(org.neo4j.internal.schema.IndexDescriptor index)
        Specified by:
        indexGetOwningUniquenessConstraintId in interface org.neo4j.storageengine.api.StorageReader
      • countsForNode

        public long countsForNode​(int labelId,
                                  org.neo4j.io.pagecache.context.CursorContext cursorContext)
        Specified by:
        countsForNode in interface org.neo4j.storageengine.api.StorageReader
      • countsForRelationship

        public long countsForRelationship​(int startLabelId,
                                          int typeId,
                                          int endLabelId,
                                          org.neo4j.io.pagecache.context.CursorContext cursorContext)
        Specified by:
        countsForRelationship in interface org.neo4j.storageengine.api.StorageReader
      • nodesGetCount

        public long nodesGetCount​(org.neo4j.io.pagecache.context.CursorContext cursorContext)
        Specified by:
        nodesGetCount in interface org.neo4j.storageengine.api.StorageReader
      • labelCount

        public int labelCount()
        Specified by:
        labelCount in interface org.neo4j.storageengine.api.StorageReader
      • propertyKeyCount

        public int propertyKeyCount()
        Specified by:
        propertyKeyCount in interface org.neo4j.storageengine.api.StorageReader
      • relationshipTypeCount

        public int relationshipTypeCount()
        Specified by:
        relationshipTypeCount in interface org.neo4j.storageengine.api.StorageReader
      • getOrCreateSchemaDependantState

        public <T> T getOrCreateSchemaDependantState​(java.lang.Class<T> type,
                                                     java.util.function.Function<org.neo4j.storageengine.api.StorageReader,​T> factory)
        Specified by:
        getOrCreateSchemaDependantState in interface org.neo4j.storageengine.api.StorageReader
      • allNodeScan

        public org.neo4j.storageengine.api.AllNodeScan allNodeScan()
        Specified by:
        allNodeScan in interface org.neo4j.storageengine.api.StorageReader
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.neo4j.storageengine.api.StorageReader
      • schemaSnapshot

        public org.neo4j.storageengine.api.StorageSchemaReader schemaSnapshot()
        Specified by:
        schemaSnapshot in interface org.neo4j.storageengine.api.StorageReader
      • tokenNameLookup

        public org.neo4j.common.TokenNameLookup tokenNameLookup()
        Specified by:
        tokenNameLookup in interface org.neo4j.storageengine.api.StorageReader
      • nodeExists

        protected boolean nodeExists​(long id)