use of org.neo4j.bolt.v3.runtime.ReadyState in project neo4j by neo4j.
the class BoltStateMachineV42 method buildStates.
@Override
protected States buildStates(MapValue connectionHints, MemoryTracker memoryTracker) {
memoryTracker.allocateHeap(ConnectedState.SHALLOW_SIZE + ReadyState.SHALLOW_SIZE + AutoCommitState.SHALLOW_SIZE + InTransactionState.SHALLOW_SIZE + FailedState.SHALLOW_SIZE + InterruptedState.SHALLOW_SIZE);
// v4.1
ConnectedState connected = new ConnectedState(connectionHints);
// v4
ReadyState ready = new ReadyState();
// v4
AutoCommitState autoCommitState = new AutoCommitState();
// v4
InTransactionState inTransaction = new InTransactionState();
// v4
FailedState failed = new FailedState();
// v3
InterruptedState interrupted = new InterruptedState();
connected.setReadyState(ready);
ready.setTransactionReadyState(inTransaction);
ready.setStreamingState(autoCommitState);
ready.setFailedState(failed);
ready.setInterruptedState(interrupted);
autoCommitState.setReadyState(ready);
autoCommitState.setFailedState(failed);
autoCommitState.setInterruptedState(interrupted);
inTransaction.setReadyState(ready);
inTransaction.setFailedState(failed);
inTransaction.setInterruptedState(interrupted);
failed.setInterruptedState(interrupted);
interrupted.setReadyState(ready);
return new States(connected, failed);
}
Aggregations