Search in sources :

Example 1 with IsLockedOperation

use of com.hazelcast.concurrent.lock.operations.IsLockedOperation in project hazelcast by hazelcast.

the class LockProxySupport method isLockedByCurrentThread.

public boolean isLockedByCurrentThread(NodeEngine nodeEngine, Data key) {
    IsLockedOperation operation = new IsLockedOperation(namespace, key, getThreadId());
    InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
    return f.join();
}
Also used : IsLockedOperation(com.hazelcast.concurrent.lock.operations.IsLockedOperation)

Example 2 with IsLockedOperation

use of com.hazelcast.concurrent.lock.operations.IsLockedOperation in project hazelcast by hazelcast.

the class LockProxySupport method isLocked.

public boolean isLocked(NodeEngine nodeEngine, Data key) {
    IsLockedOperation operation = new IsLockedOperation(namespace, key);
    InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
    return f.join();
}
Also used : IsLockedOperation(com.hazelcast.concurrent.lock.operations.IsLockedOperation)

Aggregations

IsLockedOperation (com.hazelcast.concurrent.lock.operations.IsLockedOperation)2