use of com.hazelcast.cp.internal.RaftOp 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.RaftOp in project hazelcast by hazelcast.
the class GetAndAddMessageTask method processMessage.
@Override
protected void processMessage() {
CPGroupId groupId = parameters.groupId;
long delta = parameters.delta;
RaftOp op = new GetAndAddOp(parameters.name, delta);
if (delta == 0) {
query(groupId, op, LINEARIZABLE);
} else {
invoke(groupId, op);
}
}
use of com.hazelcast.cp.internal.RaftOp in project hazelcast by hazelcast.
the class TryLockMessageTask method processMessage.
@Override
protected void processMessage() {
RaftOp op = new TryLockOp(parameters.name, parameters.sessionId, parameters.threadId, parameters.invocationUid, parameters.timeoutMs);
invoke(parameters.groupId, op);
}
use of com.hazelcast.cp.internal.RaftOp in project hazelcast by hazelcast.
the class UnlockMessageTask method processMessage.
@Override
protected void processMessage() {
RaftOp op = new UnlockOp(parameters.name, parameters.sessionId, parameters.threadId, parameters.invocationUid);
invoke(parameters.groupId, op);
}
use of com.hazelcast.cp.internal.RaftOp in project hazelcast by hazelcast.
the class CompareAndSetMessageTask method processMessage.
@Override
protected void processMessage() {
RaftOp op = new CompareAndSetOp(parameters.name, parameters.oldValue, parameters.newValue);
invoke(parameters.groupId, op);
}
Aggregations