@Override public int propertyKey() { if ( txStateValue != null ) { return txStateValue.propertyKeyId(); } return storeCursor.propertyKey(); }
private long[] readLongs( ReadableChannel channel, int count ) throws IOException { long[] result = new long[count]; for ( int i = 0; i < count; i++ ) { result[i] = channel.getLong(); } return result; }
@Override protected StorageNodeCursor allocateCursor( StorageReader storageReader ) { return storageReader.allocateNodeCursor(); }
private StorageRelationshipTraversalCursor allocateRelationshipTraversalCursor( StorageNodeCursor node ) { StorageRelationshipTraversalCursor relationships = storageReader.allocateRelationshipTraversalCursor(); relationships.init( node.entityReference(), node.allRelationshipsReference() ); return relationships; }
private Value committedValue( StoragePropertyCursor properties, long propertiesReference, int propertyKey ) { properties.init( propertiesReference ); while ( properties.next() ) { if ( properties.propertyKey() == propertyKey ) { return properties.propertyValue(); } } return Values.NO_VALUE; }
private boolean nodeExists( long id ) { try ( StorageNodeCursor node = storageReader.allocateNodeCursor() ) { node.single( id ); return node.next(); } }
private boolean relationshipExists( long id ) { try ( StorageRelationshipScanCursor relationship = storageReader.allocateRelationshipScanCursor() ) { relationship.single( id ); return relationship.next(); } } }
private StorageNodeCursor allocateNodeCursor( long nodeId ) { StorageNodeCursor nodeCursor = storageReader.allocateNodeCursor(); nodeCursor.single( nodeId ); return nodeCursor; }
public EntityNotFoundException( EntityType entityType, long entityId ) { super( Status.Statement.EntityNotFound, "Unable to load %s with id %s.", entityType.name(), entityId ); this.entityType = entityType; this.entityId = entityId; }
@Override public long allRelationshipsReference() { return storeCursor.allRelationshipsReference(); }
@Override protected void read( StorageRelationshipScanCursor cursor, long id ) { cursor.single( id ); }
@Override public void startRecovery() { // Calling this method means that recovery is required, tell storage engine about it // This method will be called before recovery actually starts and so will ensure that // each store is aware that recovery will be performed. At this point all the stores have // already started btw. // Go and read more at {@link CommonAbstractStore#deleteIdGenerator()} storageEngine.prepareForRecoveryRequired(); }
@Override public long countsForNodeWithoutTxState( int labelId ) { return storageReader.countsForNode( labelId ); }
void release() { storeCursor.close(); } }
@Override public long relationshipReference() { return storeCursor.entityReference(); }
@Override public int type() { return storeCursor.type(); }
@Override public long targetNodeReference() { return storeCursor.targetNodeReference(); }
@Override LabelScanReader labelScanReader() { return storageReader.getLabelScanReader(); }
@Override public StorageNodeCursor allocateNodeCursor() { return new StubStorageNodeCursor(); }
@Override public StoragePropertyCursor allocatePropertyCursor() { return new StubStoragePropertyCursor(); }