use of com.hazelcast.client.impl.ClientEngine in project hazelcast by hazelcast.
the class LockOperation method run.
@Override
public void run() throws Exception {
interceptLockOperation();
if (isClient) {
ClientEngine clientEngine = getNodeEngine().getService(ClientEngineImpl.SERVICE_NAME);
clientEngine.onClientAcquiredResource(getCallerUuid());
}
final boolean lockResult = getLockStore().lock(key, getCallerUuid(), threadId, getReferenceCallId(), leaseTime);
response = lockResult;
ILogger logger = getLogger();
if (logger.isFinestEnabled()) {
if (lockResult) {
logger.finest("Acquired lock " + namespace.getObjectName() + " for " + getCallerAddress() + " - " + getCallerUuid() + ", thread ID: " + threadId);
} else {
logger.finest("Could not acquire lock " + namespace.getObjectName() + " as owned by " + getLockStore().getOwnerInfo(key));
}
}
}
use of com.hazelcast.client.impl.ClientEngine in project hazelcast by hazelcast.
the class LockBackupOperation method run.
@Override
public void run() throws Exception {
if (isClient) {
ClientEngine clientEngine = getNodeEngine().getService(ClientEngineImpl.SERVICE_NAME);
clientEngine.onClientAcquiredResource(originalCallerUuid);
}
interceptLockOperation();
LockStoreImpl lockStore = getLockStore();
response = lockStore.lock(key, originalCallerUuid, threadId, getReferenceCallId(), leaseTime);
}
Aggregations