use of com.hazelcast.spi.impl.operationservice.impl.RaftInvocation in project hazelcast by hazelcast.
the class RaftInvocationManager method invoke.
public <T> InternalCompletableFuture<T> invoke(CPGroupId groupId, RaftOp raftOp, boolean deserializeResponse) {
if (cpSubsystemEnabled) {
Operation operation = new DefaultRaftReplicateOp(groupId, raftOp);
Invocation invocation = new RaftInvocation(operationService.getInvocationContext(), raftInvocationContext, groupId, operation, invocationMaxRetryCount, invocationRetryPauseMillis, operationCallTimeout, deserializeResponse);
return invocation.invoke();
}
return invokeOnPartition(new UnsafeRaftReplicateOp(groupId, raftOp), deserializeResponse);
}
use of com.hazelcast.spi.impl.operationservice.impl.RaftInvocation in project hazelcast by hazelcast.
the class RaftInvocationManager method destroy.
public InternalCompletableFuture<Object> destroy(CPGroupId groupId) {
InternalCompletableFuture<Object> completedFuture = completeExceptionallyIfCPSubsystemNotAvailable();
if (completedFuture != null) {
return completedFuture;
}
Operation operation = new DestroyRaftGroupOp(groupId);
Invocation invocation = new RaftInvocation(operationService.getInvocationContext(), raftInvocationContext, groupId, operation, invocationMaxRetryCount, invocationRetryPauseMillis, operationCallTimeout);
return invocation.invoke();
}
use of com.hazelcast.spi.impl.operationservice.impl.RaftInvocation in project hazelcast by hazelcast.
the class RaftInvocationManager method changeMembership.
<T> InternalCompletableFuture<T> changeMembership(CPGroupId groupId, long membersCommitIndex, RaftEndpoint member, MembershipChangeMode membershipChangeMode) {
InternalCompletableFuture<T> completedFuture = completeExceptionallyIfCPSubsystemNotAvailable();
if (completedFuture != null) {
return completedFuture;
}
Operation operation = new ChangeRaftGroupMembershipOp(groupId, membersCommitIndex, member, membershipChangeMode);
Invocation invocation = new RaftInvocation(operationService.getInvocationContext(), raftInvocationContext, groupId, operation, invocationMaxRetryCount, invocationRetryPauseMillis, operationCallTimeout);
return invocation.invoke();
}
use of com.hazelcast.spi.impl.operationservice.impl.RaftInvocation in project hazelcast by hazelcast.
the class RaftInvocationManager method query.
public <T> InternalCompletableFuture<T> query(CPGroupId groupId, RaftOp raftOp, QueryPolicy queryPolicy, boolean deserializeResponse) {
if (cpSubsystemEnabled) {
RaftQueryOp operation = new RaftQueryOp(groupId, raftOp, queryPolicy);
Invocation invocation = new RaftInvocation(operationService.getInvocationContext(), raftInvocationContext, groupId, operation, invocationMaxRetryCount, invocationRetryPauseMillis, operationCallTimeout, deserializeResponse);
return invocation.invoke();
}
return invokeOnPartition(new UnsafeRaftQueryOp(groupId, raftOp), deserializeResponse);
}
Aggregations