private Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { NeoStoreRecord before = readNeoStoreRecord( channel ); NeoStoreRecord after = readNeoStoreRecord( channel ); return new Command.NeoStoreCommand( before, after ); }
private Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { NeoStoreRecord before = readNeoStoreRecord( channel ); NeoStoreRecord after = readNeoStoreRecord( channel ); return new Command.NeoStoreCommand( before, after ); }
private BatchTransactionApplier newApplier( boolean recovery ) { BatchTransactionApplier applier = new NeoStoreBatchTransactionApplier( neoStores, cacheAccess, lockService ); if ( recovery ) { applier = newApplierFacade( new HighIdBatchTransactionApplier( neoStores ), applier, new CacheInvalidationBatchTransactionApplier( neoStores, cacheAccess ) ); } return applier; }
private Command visitRelationshipGroupCommand( ReadableChannel channel ) throws IOException { long id = channel.getLong(); RelationshipGroupRecord before = readRelationshipGroupRecord( id, channel ); RelationshipGroupRecord after = readRelationshipGroupRecord( id, channel ); return new Command.RelationshipGroupCommand( before, after ); }
@Override public boolean visit( StorageCommand element ) { if ( element instanceof NodeCommand ) { nodeId = ((NodeCommand)element).getKey(); } return false; }
@Test public void readRelGroupWithHugeTypeInV3_0_2() throws IOException { assertCanReadRelGroup( new PhysicalLogCommandReaderV3_0_2() ); }
@Test public void readRelGroupWithHugeTypeInV2_2_10() throws IOException { assertCanReadRelGroup( new PhysicalLogCommandReaderV2_2_10() ); }
@Override public boolean visit( StorageCommand element ) throws IOException { return ((Command)element).handle( this ); } }
@Override public TransactionApplier startTx( CommandsToApply transaction ) { return new HighIdTransactionApplier( neoStores ); } }
@Override public boolean visitSchemaRuleCommand( SchemaRuleCommand command ) { SchemaStore schemaStore = neoStores.getSchemaStore(); for ( DynamicRecord record : command.getRecordsAfter() ) { track( schemaStore, record ); } return false; }
@Override public String toString() { return beforeAndAfterToString( before, after ); }
@Override public String toString() { return beforeAndAfterToString( before, after ); } }
public NodeCountsCommand( int labelId, long delta ) { setup( labelId, Mode.UPDATE ); assert delta != 0 : "Tried to create a NodeCountsCommand for something that didn't change any count"; this.labelId = labelId; this.delta = delta; }
private void track( RecordStore<?> store, Collection<? extends AbstractBaseRecord> records ) { for ( AbstractBaseRecord record : records ) { track( store, record ); } }
@Override public void close() throws Exception { applyPendingLabelAndIndexUpdates(); }
@Override public TransactionApplier startTx( CommandsToApply transaction ) { return new CacheInvalidationTransactionApplier( neoStores, cacheAccess ); } }
public RelationshipCountsCommand( int startLabelId, int typeId, int endLabelId, long delta ) { setup( typeId, Mode.UPDATE ); assert delta != 0 : "Tried to create a RelationshipCountsCommand for something that didn't change any count"; this.startLabelId = startLabelId; this.typeId = typeId; this.endLabelId = endLabelId; this.delta = delta; }
@Override public boolean visit( StorageCommand element ) throws IOException { for ( TransactionApplier applier : appliers ) { if ( ((Command)element).handle( applier ) ) { return true; } } return false; }