public void add( NeoStoreRecord before, NeoStoreRecord after ) { otherCommands.add( new Command.NeoStoreCommand( before, after ) ); }
public void update( NeoStoreRecord before, NeoStoreRecord after ) { otherCommands.add( new Command.NeoStoreCommand( before, after ) ); }
commands.add( new Command.NeoStoreCommand( change.getBefore(), change.forReadingData() ) );
commands.add( new Command.NeoStoreCommand( change.getBefore(), change.forReadingData() ) );
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 { long nextProp = channel.getLong(); NeoStoreRecord record = new NeoStoreRecord(); record.setNextProp( nextProp ); return new Command.NeoStoreCommand( null, record ); }
private Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { long nextProp = channel.getLong(); NeoStoreRecord record = new NeoStoreRecord(); record.setNextProp( nextProp ); return new Command.NeoStoreCommand( null, record ); }
public void add( NeoStoreRecord record ) { Command.NeoStoreCommand command = new Command.NeoStoreCommand(); command.init( record ); addCommand( command ); }
public void update( NeoStoreRecord record ) { Command.NeoStoreCommand command = new Command.NeoStoreCommand(); command.init( record ); addCommand( command ); }
private Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { NeoStoreRecord before = readNeoStoreRecord( channel ); NeoStoreRecord after = readNeoStoreRecord( channel ); return new Command.NeoStoreCommand( before, after ); }
@Test public void shouldApplyNeoStoreCommandToTheStore() throws Exception { // given final BatchTransactionApplier applier = newApplier( false ); final NeoStoreRecord before = new NeoStoreRecord(); final NeoStoreRecord after = new NeoStoreRecord(); after.setNextProp( 42 ); final Command command = new Command.NeoStoreCommand( before, after ); // when boolean result = apply( applier, command::handle, transactionToApply ); // then assertFalse( result ); verify( metaDataStore, times( 1 ) ).setGraphNextProp( after.getNextProp() ); }
@Test public void shouldReadNeoStoreCommand() throws Throwable { // Given InMemoryClosableChannel channel = new InMemoryClosableChannel(); NeoStoreRecord before = new NeoStoreRecord(); NeoStoreRecord after = new NeoStoreRecord(); after.setNextProp( 42 ); new Command.NeoStoreCommand( before, after ).serialize( channel ); // When PhysicalLogCommandReaderV3_0 reader = new PhysicalLogCommandReaderV3_0(); Command command = reader.read( channel ); assertTrue( command instanceof Command.NeoStoreCommand); Command.NeoStoreCommand neoStoreCommand = (Command.NeoStoreCommand) command; // Then assertEquals( before.getNextProp(), neoStoreCommand.getBefore().getNextProp() ); assertEquals( after.getNextProp(), neoStoreCommand.getAfter().getNextProp() ); }
@Test public void shouldApplyNeoStoreCommandToTheStoreInRecovery() throws Exception { // given final BatchTransactionApplier applier = newApplier( true ); final NeoStoreRecord before = new NeoStoreRecord(); final NeoStoreRecord after = new NeoStoreRecord(); after.setNextProp( 42 ); final Command command = new Command.NeoStoreCommand( before, after ); // when boolean result = apply( applier, command::handle, transactionToApply ); // then assertFalse( result ); verify( metaDataStore, times( 1 ) ).setGraphNextProp( after.getNextProp() ); }
private Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { long nextProp = channel.getLong(); NeoStoreRecord record = new NeoStoreRecord(); record.setNextProp( nextProp ); return new Command.NeoStoreCommand( null, record ); }
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 Command visitNeoStoreCommand( ReadableChannel channel ) throws IOException { long nextProp = channel.getLong(); NeoStoreRecord record = new NeoStoreRecord(); record.setNextProp( nextProp ); return new Command.NeoStoreCommand( null, record ); }