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();
}
Aggregations