use of com.hazelcast.cp.internal.datastructures.atomiclong.operation.LocalGetOp in project hazelcast by hazelcast.
the class AtomicLongProxy method localGetAsync.
public InternalCompletableFuture<Long> localGetAsync(QueryPolicy queryPolicy) {
InternalCompletableFuture<Long> resultFuture = new InternalCompletableFuture<>();
InternalCompletableFuture<Long> localFuture = invocationManager.queryLocally(groupId, new LocalGetOp(objectName), queryPolicy);
localFuture.whenCompleteAsync((response, throwable) -> {
if (throwable == null) {
resultFuture.complete(response);
} else {
InternalCompletableFuture<Long> future = invocationManager.query(groupId, new LocalGetOp(objectName), queryPolicy);
future.whenCompleteAsync(completingCallback(resultFuture));
}
});
return resultFuture;
}
Aggregations