Search in sources :

Example 1 with ReturnValueType

use of com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp.ReturnValueType 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);
    }
}
Also used : CPGroupId(com.hazelcast.cp.CPGroupId) ReturnValueType(com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp.ReturnValueType) RaftOp(com.hazelcast.cp.internal.RaftOp) ApplyOp(com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp)

Aggregations

CPGroupId (com.hazelcast.cp.CPGroupId)1 RaftOp (com.hazelcast.cp.internal.RaftOp)1 ApplyOp (com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp)1 ReturnValueType (com.hazelcast.cp.internal.datastructures.atomicref.operation.ApplyOp.ReturnValueType)1