@Override public TransactionApplier startTx( CommandsToApply transaction ) throws IOException { TransactionApplier[] txAppliers = new TransactionApplier[appliers.length]; for ( int i = 0; i < appliers.length; i++ ) { txAppliers[i] = appliers[i].startTx( transaction ); } return new TransactionApplierFacade( txAppliers ); }
@Override public Stream<ExecutingQuery> executingQueries( KernelStatement statement ) { return statement.executingQueryList().queries(); }
@Override public void extractCommands( Collection<StorageCommand> target ) { accept( new CommandCollector( target ) ); }
final void stopQueryExecution( ExecutingQuery executingQuery ) { this.executingQueryList = executingQueryList.remove( executingQuery ); transaction.getStatistics().addWaitingTime( executingQuery.reportedWaitingTimeNanos() ); }
public List<Difference> verify( CountsVisitor.Visitable visitable ) { Verifier verifier = new Verifier( counts ); visitable.accept( verifier ); return verifier.differences(); }
@Override public Map<String,Object> getMetaData() { statement.assertOpen(); return statement.getTransaction().getMetaData(); }
@Override public void setMetaData( Map<String,Object> data ) { statement.assertOpen(); statement.getTransaction().setMetaData( data ); }
@Override public boolean visitIndexAddNodeCommand( IndexCommand.AddNodeCommand command ) throws IOException { return applier( command ).visitIndexAddNodeCommand( command ); }
@Override public boolean visitIndexRemoveCommand( IndexCommand.RemoveCommand command ) throws IOException { return applier( command ).visitIndexRemoveCommand( command ); }
StatementNotClosedException( String s, Deque<StackTraceElement[]> openCloseTraces ) { super( s ); this.addSuppressed( new StatementTraceException( buildMessage( openCloseTraces ) ) ); }
@Override public KernelStatement acquireStatement() { assertTransactionOpen(); currentStatement.acquire(); return currentStatement; }
@Override public boolean visitIndexAddRelationshipCommand( IndexCommand.AddRelationshipCommand command ) throws IOException { return applier( command ).visitIndexAddRelationshipCommand( command ); }
@Override public TransactionExecutionStatistic transactionStatistic() { if ( txReuseCount == tx.getReuseCount() ) { return new TransactionExecutionStatistic( tx, clock, startTime ); } else { return TransactionExecutionStatistic.NOT_AVAILABLE; } }
@Override public boolean visitIndexDeleteCommand( IndexCommand.DeleteCommand command ) throws IOException { return applier( command ).visitIndexDeleteCommand( command ); }
private StatementOperationParts buildStatementOperations( AtomicReference<CpuClock> cpuClockRef, AtomicReference<HeapAllocation> heapAllocationRef ) { QueryRegistrationOperations queryRegistrationOperations = new StackingQueryRegistrationOperations( clock, cpuClockRef, heapAllocationRef ); return new StatementOperationParts( queryRegistrationOperations ); }
public void update( CountsOracle target ) { state.accept( new CountsAccessor.Initializer( target.state, target.state ) ); }
void upgradeToSchemaWrites() throws InvalidTransactionTypeKernelException { schemaWriteGuard.assertSchemaWritesAllowed(); writeState = writeState.upgradeToSchemaWrites(); }
static TestKernelTransaction create() { return new TestKernelTransaction( new CommitTrackingMonitor() ); }
@Override public boolean visitNodeCommand( NodeCommand command ) throws IOException { return delegate.visitNodeCommand( command ); }
@Override public TransactionApplier startTx( CommandsToApply transaction, LockGroup lockGroup ) throws IOException { TransactionApplier[] txAppliers = new TransactionApplier[appliers.length]; for ( int i = 0; i < appliers.length; i++ ) { txAppliers[i] = appliers[i].startTx( transaction, lockGroup ); } return new TransactionApplierFacade( txAppliers ); }