Search in sources :

Example 1 with AwaitInvocationKey

use of com.hazelcast.cp.internal.datastructures.countdownlatch.AwaitInvocationKey in project hazelcast by hazelcast.

the class AwaitOp method run.

@Override
public Object run(CPGroupId groupId, long commitIndex) {
    CountDownLatchService service = getService();
    AwaitInvocationKey key = new AwaitInvocationKey(commitIndex, invocationUid, callerAddress, callId);
    if (service.await(groupId, name, key, timeoutMillis)) {
        return true;
    }
    return timeoutMillis > 0 ? PostponedResponse.INSTANCE : false;
}
Also used : AwaitInvocationKey(com.hazelcast.cp.internal.datastructures.countdownlatch.AwaitInvocationKey) CountDownLatchService(com.hazelcast.cp.internal.datastructures.countdownlatch.CountDownLatchService)

Aggregations

AwaitInvocationKey (com.hazelcast.cp.internal.datastructures.countdownlatch.AwaitInvocationKey)1 CountDownLatchService (com.hazelcast.cp.internal.datastructures.countdownlatch.CountDownLatchService)1