use of com.hazelcast.cp.internal.operation.unsafe.UnsafeRaftQueryOp in project hazelcast by hazelcast.
the class RaftInvocationManager method queryLocally.
public <T> InternalCompletableFuture<T> queryLocally(CPGroupId groupId, RaftOp raftOp, QueryPolicy queryPolicy) {
Operation operation;
if (cpSubsystemEnabled) {
operation = new RaftQueryOp(groupId, raftOp, queryPolicy);
} else {
operation = new UnsafeRaftQueryOp(groupId, raftOp);
}
operation.setPartitionId(raftService.getCPGroupPartitionId(groupId));
return nodeEngine.getOperationService().invokeOnTarget(RaftService.SERVICE_NAME, operation, nodeEngine.getThisAddress());
}
use of com.hazelcast.cp.internal.operation.unsafe.UnsafeRaftQueryOp 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