use of com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp in project hazelcast by hazelcast.
the class AtomicRefProxy method applyAsync.
@Override
public <R> InternalCompletableFuture<R> applyAsync(IFunction<T, R> function) {
checkTrue(function != null, "Function cannot be null");
RaftOp op = new ApplyOp(objectName, toData(function), RETURN_NEW_VALUE, false);
return invocationManager.query(groupId, op, LINEARIZABLE);
}
use of com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp in project hazelcast by hazelcast.
the class ApplyMessageTask method processMessage.
@Override
protected void processMessage() {
ReturnValueType returnValueType = ReturnValueType.fromValue(parameters.returnValueType);
CPGroupId groupId = parameters.groupId;
RaftOp op = new ApplyOp(parameters.name, parameters.function, returnValueType, parameters.alter);
if (parameters.alter) {
invoke(groupId, op);
} else {
query(groupId, op, LINEARIZABLE);
}
}
Aggregations