use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.
the class UnlockOperation method afterRun.
@Override
public void afterRun() throws Exception {
LockStoreImpl lockStore = getLockStore();
AwaitOperation awaitOperation = lockStore.pollExpiredAwaitOp(key);
if (awaitOperation != null) {
awaitOperation.runExpired();
}
shouldNotify = awaitOperation == null;
}
use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.
the class LocalLockCleanupOperation method run.
@Override
public void run() throws Exception {
LockStoreImpl lockStore = getLockStore();
LockResource lock = lockStore.getLock(key);
if (uuid.equals(lock.getOwner())) {
ILogger logger = getLogger();
if (logger.isFinestEnabled()) {
logger.finest("Unlocking lock owned by uuid: " + uuid + ", thread-id: " + lock.getThreadId() + ", count: " + lock.getLockCount());
}
response = lockStore.forceUnlock(key);
}
}
use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.
the class LockReplicationOperation method readInternal.
@Override
protected void readInternal(final ObjectDataInput in) throws IOException {
super.readInternal(in);
int len = in.readInt();
if (len > 0) {
for (int i = 0; i < len; i++) {
LockStoreImpl ls = new LockStoreImpl();
ls.readData(in);
locks.add(ls);
}
}
}
use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.
the class LockReplicationOperation method run.
@Override
public void run() {
LockServiceImpl lockService = getService();
LockStoreContainer container = lockService.getLockContainer(getPartitionId());
for (LockStoreImpl ls : locks) {
container.put(ls);
}
}
use of com.hazelcast.concurrent.lock.LockStoreImpl in project hazelcast by hazelcast.
the class UnlockBackupOperation method run.
@Override
public void run() throws Exception {
LockStoreImpl lockStore = getLockStore();
boolean unlocked;
if (force) {
unlocked = lockStore.forceUnlock(key);
} else {
unlocked = lockStore.unlock(key, originalCallerUuid, threadId, getReferenceCallId());
}
response = unlocked;
lockStore.pollExpiredAwaitOp(key);
}
Aggregations