public interface StoreReadLayer
store
.Modifier and Type | Method and Description |
---|---|
boolean |
constraintExists(org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor descriptor) |
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> |
constraintsGetAll() |
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> |
constraintsGetForLabel(int labelId) |
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> |
constraintsGetForRelationshipType(int typeId) |
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> |
constraintsGetForSchema(org.neo4j.kernel.api.schema.SchemaDescriptor descriptor) |
long |
countsForNode(int labelId)
Returns number of stored nodes labeled with the label represented by
labelId . |
long |
countsForRelationship(int startLabelId,
int typeId,
int endLabelId)
Returns number of stored relationships of a certain
typeId whose start/end nodes are labeled
with the startLabelId and endLabelId respectively. |
int |
degreeRelationshipsInGroup(StorageStatement storeStatement,
long id,
long groupId,
Direction direction,
Integer relType) |
void |
degrees(StorageStatement statement,
NodeItem nodeItem,
org.neo4j.kernel.impl.api.DegreeVisitor visitor) |
<T> T |
getOrCreateSchemaDependantState(Class<T> type,
Function<StoreReadLayer,T> factory) |
Iterator<StorageProperty> |
graphGetAllProperties() |
Object |
graphGetProperty(int propertyKeyId) |
org.neo4j.collection.primitive.PrimitiveIntIterator |
graphGetPropertyKeys() |
Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> |
indexesGetAll() |
Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> |
indexesGetForLabel(int labelId) |
Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> |
indexesGetRelatedToProperty(int propertyId)
Returns all indexes (including unique) related to a property.
|
long |
indexGetCommittedId(org.neo4j.kernel.api.schema.index.IndexDescriptor index) |
String |
indexGetFailure(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor)
Returns any failure that happened during population or operation of an index.
|
org.neo4j.kernel.api.schema.index.IndexDescriptor |
indexGetForSchema(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor)
Looks for a stored index by given
descriptor |
Long |
indexGetOwningUniquenessConstraintId(org.neo4j.kernel.api.schema.index.IndexDescriptor index) |
PopulationProgress |
indexGetPopulationProgress(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) |
org.neo4j.kernel.api.index.InternalIndexState |
indexGetState(org.neo4j.kernel.api.schema.index.IndexDescriptor descriptor)
Returns state of a stored index.
|
org.neo4j.register.Register.DoubleLongRegister |
indexSample(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor,
org.neo4j.register.Register.DoubleLongRegister target) |
long |
indexSize(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor)
Returns size of index, i.e.
|
double |
indexUniqueValuesPercentage(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor)
Returns percentage of values in the given
index are unique. |
org.neo4j.register.Register.DoubleLongRegister |
indexUpdatesAndSize(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor,
org.neo4j.register.Register.DoubleLongRegister target) |
int |
labelCount() |
int |
labelGetForName(String labelName) |
String |
labelGetName(int labelId) |
int |
labelGetOrCreateForName(String labelName)
Gets label token id for the given
labelName , or creates one if there is no
existing label with the given name. |
Iterator<Token> |
labelsGetAllTokens() |
StorageStatement |
newStatement() |
boolean |
nodeExists(long id) |
org.neo4j.cursor.Cursor<PropertyItem> |
nodeGetProperties(StorageStatement statement,
NodeItem node,
org.neo4j.kernel.api.AssertOpen assertOpen) |
org.neo4j.cursor.Cursor<PropertyItem> |
nodeGetProperty(StorageStatement statement,
NodeItem node,
int propertyKeyId,
org.neo4j.kernel.api.AssertOpen assertOpen) |
org.neo4j.cursor.Cursor<RelationshipItem> |
nodeGetRelationships(StorageStatement statement,
NodeItem nodeItem,
Direction direction) |
org.neo4j.cursor.Cursor<RelationshipItem> |
nodeGetRelationships(StorageStatement statement,
NodeItem nodeItem,
Direction direction,
IntPredicate typeIds) |
org.neo4j.collection.primitive.PrimitiveLongIterator |
nodesGetAll() |
long |
nodesGetCount() |
org.neo4j.collection.primitive.PrimitiveLongIterator |
nodesGetForLabel(StorageStatement statement,
int labelId) |
int |
propertyKeyCount() |
Iterator<Token> |
propertyKeyGetAllTokens() |
int |
propertyKeyGetForName(String propertyKeyName) |
String |
propertyKeyGetName(int propertyKeyId) |
int |
propertyKeyGetOrCreateForName(String propertyKeyName)
Gets property key token id for the given
propertyKeyName , or creates one if there is no
existing property key with the given name. |
org.neo4j.cursor.Cursor<PropertyItem> |
relationshipGetProperties(StorageStatement statement,
RelationshipItem relationship,
org.neo4j.kernel.api.AssertOpen assertOpen) |
org.neo4j.cursor.Cursor<PropertyItem> |
relationshipGetProperty(StorageStatement statement,
RelationshipItem relationshipItem,
int propertyKeyId,
org.neo4j.kernel.api.AssertOpen assertOpen) |
org.neo4j.kernel.impl.api.store.RelationshipIterator |
relationshipsGetAll() |
long |
relationshipsGetCount() |
int |
relationshipTypeCount() |
Iterator<Token> |
relationshipTypeGetAllTokens() |
int |
relationshipTypeGetForName(String relationshipTypeName) |
String |
relationshipTypeGetName(int relationshipTypeId) |
int |
relationshipTypeGetOrCreateForName(String relationshipTypeName)
Gets relationship type token id for the given
relationshipTypeName , or creates one if there is no
existing relationship type with the given name. |
org.neo4j.collection.primitive.PrimitiveIntSet |
relationshipTypes(StorageStatement statement,
NodeItem node) |
<EXCEPTION extends Exception> |
relationshipVisit(long relationshipId,
org.neo4j.kernel.impl.api.RelationshipVisitor<EXCEPTION> relationshipVisitor)
Visits data about a relationship.
|
void |
releaseNode(long id)
Releases a previously
reserved node id if it turns out to not actually being used,
for example in the event of a transaction rolling back. |
void |
releaseRelationship(long id)
Releases a previously
reserved relationship id if it turns out to not
actually being used, for example in the event of a transaction rolling back. |
long |
reserveNode()
Reserves a node id for future use to store a node.
|
long |
reserveRelationship()
Reserves a relationship id for future use to store a relationship.
|
StorageStatement newStatement()
StorageStatement
, which can be used after a call to StorageStatement.acquire()
.Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> indexesGetForLabel(int labelId)
labelId
- label to list indexes for.IndexDescriptor
associated with the given labelId
.Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> indexesGetAll()
IndexDescriptor
in storage.Iterator<org.neo4j.kernel.api.schema.index.IndexDescriptor> indexesGetRelatedToProperty(int propertyId)
Long indexGetOwningUniquenessConstraintId(org.neo4j.kernel.api.schema.index.IndexDescriptor index) throws org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException
index
- IndexDescriptor
to get related uniqueness constraint for.index
, or null
if the given index isn't related to a uniqueness constraint.org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException
- if there's no such index matching the given index
in storage.long indexGetCommittedId(org.neo4j.kernel.api.schema.index.IndexDescriptor index) throws org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException
index
- IndexDescriptor
to get schema rule id for.org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException
- if no such index exists in storage.org.neo4j.collection.primitive.PrimitiveIntIterator graphGetPropertyKeys()
Object graphGetProperty(int propertyKeyId)
propertyKeyId
- property key id to get graph property for.propertyKeyId
, or null
if not found.Iterator<StorageProperty> graphGetAllProperties()
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> constraintsGetForSchema(org.neo4j.kernel.api.schema.SchemaDescriptor descriptor)
descriptor
- describing the label and property key (or keys) defining the requested constraint.boolean constraintExists(org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor descriptor)
Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> constraintsGetForLabel(int labelId)
labelId
- label token id.Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> constraintsGetForRelationshipType(int typeId)
typeId
- relationship type token id .Iterator<org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor> constraintsGetAll()
org.neo4j.collection.primitive.PrimitiveLongIterator nodesGetForLabel(StorageStatement statement, int labelId)
org.neo4j.kernel.api.schema.index.IndexDescriptor indexGetForSchema(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor)
descriptor
descriptor
- a description of the index.IndexDescriptor
for matching index, or null
if not found.org.neo4j.kernel.api.index.InternalIndexState indexGetState(org.neo4j.kernel.api.schema.index.IndexDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
descriptor
- LabelSchemaDescriptor
to get state for.InternalIndexState
for index.org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
- if index not found.PopulationProgress indexGetPopulationProgress(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
descriptor
- LabelSchemaDescriptor
to get population progress for.org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
- if index not found.String indexGetFailure(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
descriptor
- LabelSchemaDescriptor
to get failure for.null
if index is working as it should.org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
- if index not found.int labelGetForName(String labelName)
labelName
- name of label.String labelGetName(int labelId) throws org.neo4j.kernel.api.exceptions.LabelNotFoundKernelException
labelId
- label id to get name for.org.neo4j.kernel.api.exceptions.LabelNotFoundKernelException
- if no label by labelId
was found.int propertyKeyGetForName(String propertyKeyName)
propertyKeyName
- name of property key.int propertyKeyGetOrCreateForName(String propertyKeyName)
propertyKeyName
, or creates one if there is no
existing property key with the given name.propertyKeyName
- name of property key.String propertyKeyGetName(int propertyKeyId) throws org.neo4j.kernel.api.exceptions.PropertyKeyIdNotFoundKernelException
propertyKeyId
- property key to get name for.org.neo4j.kernel.api.exceptions.PropertyKeyIdNotFoundKernelException
- if no property key by propertyKeyId
was found.Iterator<Token> propertyKeyGetAllTokens()
Iterator<Token> relationshipTypeGetAllTokens()
int relationshipTypeGetForName(String relationshipTypeName)
relationshipTypeName
- name of relationship type.String relationshipTypeGetName(int relationshipTypeId) throws org.neo4j.kernel.api.exceptions.RelationshipTypeIdNotFoundKernelException
relationshipTypeId
- relationship type id to get name for.org.neo4j.kernel.api.exceptions.RelationshipTypeIdNotFoundKernelException
- if no label by labelId
was found.int labelGetOrCreateForName(String labelName) throws org.neo4j.kernel.api.exceptions.schema.TooManyLabelsException
labelName
, or creates one if there is no
existing label with the given name.labelName
- name of label.org.neo4j.kernel.api.exceptions.schema.TooManyLabelsException
- if creating this label would have exceeded storage limitations for
number of stored labels.int relationshipTypeGetOrCreateForName(String relationshipTypeName)
relationshipTypeName
, or creates one if there is no
existing relationship type with the given name.relationshipTypeName
- name of relationship type.<EXCEPTION extends Exception> void relationshipVisit(long relationshipId, org.neo4j.kernel.impl.api.RelationshipVisitor<EXCEPTION> relationshipVisitor) throws org.neo4j.kernel.api.exceptions.EntityNotFoundException, EXCEPTION extends Exception
relationshipVisitor
will be notified.relationshipId
- the id of the relationship to access.relationshipVisitor
- RelationshipVisitor
which will see the relationship data.org.neo4j.kernel.api.exceptions.EntityNotFoundException
- if no relationship exists by the given relationshipId
.EXCEPTION extends Exception
org.neo4j.collection.primitive.PrimitiveLongIterator nodesGetAll()
org.neo4j.kernel.impl.api.store.RelationshipIterator relationshipsGetAll()
org.neo4j.cursor.Cursor<RelationshipItem> nodeGetRelationships(StorageStatement statement, NodeItem nodeItem, Direction direction)
org.neo4j.cursor.Cursor<RelationshipItem> nodeGetRelationships(StorageStatement statement, NodeItem nodeItem, Direction direction, IntPredicate typeIds)
org.neo4j.cursor.Cursor<PropertyItem> nodeGetProperties(StorageStatement statement, NodeItem node, org.neo4j.kernel.api.AssertOpen assertOpen)
org.neo4j.cursor.Cursor<PropertyItem> nodeGetProperty(StorageStatement statement, NodeItem node, int propertyKeyId, org.neo4j.kernel.api.AssertOpen assertOpen)
org.neo4j.cursor.Cursor<PropertyItem> relationshipGetProperties(StorageStatement statement, RelationshipItem relationship, org.neo4j.kernel.api.AssertOpen assertOpen)
org.neo4j.cursor.Cursor<PropertyItem> relationshipGetProperty(StorageStatement statement, RelationshipItem relationshipItem, int propertyKeyId, org.neo4j.kernel.api.AssertOpen assertOpen)
long reserveNode()
long reserveRelationship()
void releaseNode(long id)
reserved
node id if it turns out to not actually being used,
for example in the event of a transaction rolling back.id
- reserved node id to release.void releaseRelationship(long id)
reserved
relationship id if it turns out to not
actually being used, for example in the event of a transaction rolling back.id
- reserved relationship id to release.long countsForNode(int labelId)
labelId
.labelId
- label id to match.long countsForRelationship(int startLabelId, int typeId, int endLabelId)
typeId
whose start/end nodes are labeled
with the startLabelId
and endLabelId
respectively.startLabelId
- label id of start nodes to match.typeId
- relationship type id to match.endLabelId
- label id of end nodes to match.long indexSize(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
descriptor
- LabelSchemaDescriptor
to return size for.org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
- if no such index exists.double indexUniqueValuesPercentage(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
index
are unique. A value of 1.0
means that
all values in the index are unique, e.g. that there are no duplicate values. A value of, say 0.9
means that 10% of the values are duplicates.descriptor
- LabelSchemaDescriptor
to get uniqueness percentage for.1.0
for all unique.org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
- if no such index exists.long nodesGetCount()
long relationshipsGetCount()
int labelCount()
int propertyKeyCount()
int relationshipTypeCount()
org.neo4j.register.Register.DoubleLongRegister indexUpdatesAndSize(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor, org.neo4j.register.Register.DoubleLongRegister target) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
org.neo4j.register.Register.DoubleLongRegister indexSample(org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor, org.neo4j.register.Register.DoubleLongRegister target) throws org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException
boolean nodeExists(long id)
org.neo4j.collection.primitive.PrimitiveIntSet relationshipTypes(StorageStatement statement, NodeItem node)
void degrees(StorageStatement statement, NodeItem nodeItem, org.neo4j.kernel.impl.api.DegreeVisitor visitor)
int degreeRelationshipsInGroup(StorageStatement storeStatement, long id, long groupId, Direction direction, Integer relType)
<T> T getOrCreateSchemaDependantState(Class<T> type, Function<StoreReadLayer,T> factory)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.