Search in sources :

Example 1 with TransactionStreamingState

use of org.neo4j.bolt.v3.runtime.TransactionStreamingState in project neo4j by neo4j.

the class BoltStateMachineV3 method buildStates.

@Override
protected States buildStates(MapValue connectionHints, MemoryTracker memoryTracker) {
    memoryTracker.allocateHeap(ConnectedState.SHALLOW_SIZE + ReadyState.SHALLOW_SIZE + StreamingState.SHALLOW_SIZE + TransactionReadyState.SHALLOW_SIZE + TransactionStreamingState.SHALLOW_SIZE + FailedState.SHALLOW_SIZE + InterruptedState.SHALLOW_SIZE);
    ConnectedState connected = new ConnectedState(connectionHints);
    ReadyState ready = new ReadyState();
    StreamingState streaming = new StreamingState();
    TransactionReadyState txReady = new TransactionReadyState();
    TransactionStreamingState txStreaming = new TransactionStreamingState();
    FailedState failed = new FailedState();
    InterruptedState interrupted = new InterruptedState();
    connected.setReadyState(ready);
    ready.setTransactionReadyState(txReady);
    ready.setStreamingState(streaming);
    ready.setFailedState(failed);
    ready.setInterruptedState(interrupted);
    streaming.setReadyState(ready);
    streaming.setFailedState(failed);
    streaming.setInterruptedState(interrupted);
    txReady.setReadyState(ready);
    txReady.setTransactionStreamingState(txStreaming);
    txReady.setFailedState(failed);
    txReady.setInterruptedState(interrupted);
    txStreaming.setReadyState(txReady);
    txStreaming.setFailedState(failed);
    txStreaming.setInterruptedState(interrupted);
    failed.setInterruptedState(interrupted);
    interrupted.setReadyState(ready);
    return new States(connected, failed);
}
Also used : InterruptedState(org.neo4j.bolt.v3.runtime.InterruptedState) TransactionStreamingState(org.neo4j.bolt.v3.runtime.TransactionStreamingState) TransactionReadyState(org.neo4j.bolt.v3.runtime.TransactionReadyState) ReadyState(org.neo4j.bolt.v3.runtime.ReadyState) TransactionStreamingState(org.neo4j.bolt.v3.runtime.TransactionStreamingState) StreamingState(org.neo4j.bolt.v3.runtime.StreamingState) ConnectedState(org.neo4j.bolt.v3.runtime.ConnectedState) FailedState(org.neo4j.bolt.v3.runtime.FailedState) TransactionReadyState(org.neo4j.bolt.v3.runtime.TransactionReadyState)

Aggregations

ConnectedState (org.neo4j.bolt.v3.runtime.ConnectedState)1 FailedState (org.neo4j.bolt.v3.runtime.FailedState)1 InterruptedState (org.neo4j.bolt.v3.runtime.InterruptedState)1 ReadyState (org.neo4j.bolt.v3.runtime.ReadyState)1 StreamingState (org.neo4j.bolt.v3.runtime.StreamingState)1 TransactionReadyState (org.neo4j.bolt.v3.runtime.TransactionReadyState)1 TransactionStreamingState (org.neo4j.bolt.v3.runtime.TransactionStreamingState)1