Search in sources :

Example 16 with LockStoreImpl

use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.

the class BeforeAwaitBackupOperation method run.

@Override
public void run() throws Exception {
    LockStoreImpl lockStore = getLockStore();
    lockStore.addAwait(key, conditionId, originalCaller, threadId);
    lockStore.unlock(key, originalCaller, threadId, getReferenceCallId());
    response = true;
}
Also used : LockStoreImpl(com.hazelcast.concurrent.lock.LockStoreImpl)

Example 17 with LockStoreImpl

use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.

the class GetRemainingLeaseTimeOperation method run.

@Override
public void run() throws Exception {
    LockStoreImpl lockStore = getLockStore();
    response = lockStore.getRemainingLeaseTime(key);
}
Also used : LockStoreImpl(com.hazelcast.concurrent.lock.LockStoreImpl)

Example 18 with LockStoreImpl

use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.

the class LockBackupOperation method run.

@Override
public void run() throws Exception {
    LockStoreImpl lockStore = getLockStore();
    response = lockStore.lock(key, originalCallerUuid, threadId, getReferenceCallId(), leaseTime);
}
Also used : LockStoreImpl(com.hazelcast.concurrent.lock.LockStoreImpl)

Example 19 with LockStoreImpl

use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.

the class LockReplicationOperation method writeInternal.

@Override
protected void writeInternal(final ObjectDataOutput out) throws IOException {
    super.writeInternal(out);
    int len = locks.size();
    out.writeInt(len);
    if (len > 0) {
        for (LockStoreImpl ls : locks) {
            ls.writeData(out);
        }
    }
}
Also used : LockStoreImpl(com.hazelcast.concurrent.lock.LockStoreImpl)

Example 20 with LockStoreImpl

use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.

the class SignalOperation method beforeRun.

@Override
public void beforeRun() throws Exception {
    LockStoreImpl lockStore = getLockStore();
    boolean isLockOwner = lockStore.isLockedBy(key, getCallerUuid(), threadId);
    ensureLockOwner(lockStore, isLockOwner);
}
Also used : LockStoreImpl(com.hazelcast.concurrent.lock.LockStoreImpl)

Aggregations

LockStoreImpl (com.hazelcast.concurrent.lock.LockStoreImpl)23 LockServiceImpl (com.hazelcast.concurrent.lock.LockServiceImpl)2 LockStoreContainer (com.hazelcast.concurrent.lock.LockStoreContainer)2 ILogger (com.hazelcast.logging.ILogger)2 ConditionKey (com.hazelcast.concurrent.lock.ConditionKey)1 LockResource (com.hazelcast.concurrent.lock.LockResource)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 MultiMap (com.hazelcast.core.MultiMap)1 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1