Search in sources :

Example 1 with ReplicatedLockTokenStateMachine

use of org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenStateMachine in project neo4j by neo4j.

the class CommitProcessStateMachineCollaborationTest method lockState.

private ReplicatedLockTokenStateMachine lockState(int lockSessionId) {
    ReplicatedLockTokenStateMachine lockState = mock(ReplicatedLockTokenStateMachine.class);
    when(lockState.currentToken()).thenReturn(new ReplicatedLockTokenRequest(null, lockSessionId));
    return lockState;
}
Also used : ReplicatedLockTokenRequest(org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenRequest) ReplicatedLockTokenStateMachine(org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenStateMachine)

Example 2 with ReplicatedLockTokenStateMachine

use of org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenStateMachine in project neo4j by neo4j.

the class ReplicatedTransactionStateMachineTest method lockState.

private ReplicatedLockTokenStateMachine lockState(int lockSessionId) {
    @SuppressWarnings("unchecked") ReplicatedLockTokenStateMachine lockState = mock(ReplicatedLockTokenStateMachine.class);
    when(lockState.currentToken()).thenReturn(new ReplicatedLockTokenRequest(null, lockSessionId));
    return lockState;
}
Also used : ReplicatedLockTokenRequest(org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenRequest) ReplicatedLockTokenStateMachine(org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenStateMachine)

Aggregations

ReplicatedLockTokenRequest (org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenRequest)2 ReplicatedLockTokenStateMachine (org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenStateMachine)2