Search in sources :

Example 1 with AddAndGetOp

use of com.hazelcast.cp.internal.datastructures.atomiclong.operation.AddAndGetOp in project hazelcast by hazelcast.

the class AddAndGetMessageTask method processMessage.

@Override
protected void processMessage() {
    CPGroupId groupId = parameters.groupId;
    long delta = parameters.delta;
    RaftOp op = new AddAndGetOp(parameters.name, delta);
    if (delta == 0) {
        query(groupId, op, LINEARIZABLE);
    } else {
        invoke(groupId, op);
    }
}
Also used : CPGroupId(com.hazelcast.cp.CPGroupId) AddAndGetOp(com.hazelcast.cp.internal.datastructures.atomiclong.operation.AddAndGetOp) RaftOp(com.hazelcast.cp.internal.RaftOp)

Aggregations

CPGroupId (com.hazelcast.cp.CPGroupId)1 RaftOp (com.hazelcast.cp.internal.RaftOp)1 AddAndGetOp (com.hazelcast.cp.internal.datastructures.atomiclong.operation.AddAndGetOp)1