Search in sources :

Example 1 with MemberCursor

use of com.hazelcast.spi.impl.operationservice.impl.RaftInvocationContext.MemberCursor in project hazelcast by hazelcast.

the class RaftInvocation method getTargetEndpoint.

private CPMember getTargetEndpoint() {
    CPMember target = raftInvocationContext.getKnownLeader(groupId);
    if (target != null) {
        return target;
    }
    MemberCursor cursor = memberCursor;
    if (cursor == null || !cursor.advance()) {
        cursor = raftInvocationContext.newMemberCursor();
        if (!cursor.advance()) {
            return null;
        }
        memberCursor = cursor;
    }
    return cursor.get();
}
Also used : MemberCursor(com.hazelcast.spi.impl.operationservice.impl.RaftInvocationContext.MemberCursor) CPMember(com.hazelcast.cp.CPMember)

Aggregations

CPMember (com.hazelcast.cp.CPMember)1 MemberCursor (com.hazelcast.spi.impl.operationservice.impl.RaftInvocationContext.MemberCursor)1