Package com.hazelcast.concurrent.lock

Examples of com.hazelcast.concurrent.lock.LockStoreImpl.lock()


    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        lockStore.lock(key, originalCaller, threadId);
        ConditionKey conditionKey = new ConditionKey(namespace.getObjectName(), key, conditionId);
        lockStore.removeSignalKey(conditionKey);
        lockStore.removeAwait(key, conditionId, originalCaller, threadId);
        response = true;
    }
View Full Code Here


    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        if (!lockStore.lock(key, getCallerUuid(), threadId)) {
            throw new IllegalMonitorStateException(
                    "Current thread is not owner of the lock! -> " + lockStore.getOwnerInfo(key));
        }

        if (expired) {
View Full Code Here

        expired = true;
        LockStoreImpl lockStore = getLockStore();
        lockStore.removeSignalKey(getWaitKey());
        lockStore.removeAwait(key, conditionId, getCallerUuid(), threadId);

        boolean locked = lockStore.lock(key, getCallerUuid(), threadId);
        if (locked) {
            ResponseHandler responseHandler = getResponseHandler();
            // expired & acquired lock, send FALSE
            responseHandler.sendResponse(false);
        } else {
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        response = lockStore.lock(key, originalCallerUuid, threadId, ttl);
    }

    @Override
    protected void writeInternal(ObjectDataOutput out) throws IOException {
        super.writeInternal(out);
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        if (!lockStore.lock(key, getCallerUuid(), threadId)) {
            throw new IllegalMonitorStateException(
                    "Current thread is not owner of the lock! -> " + lockStore.getOwnerInfo(key));
        }

        if (expired) {
View Full Code Here

        expired = true;
        LockStoreImpl lockStore = getLockStore();
        lockStore.removeSignalKey(getWaitKey());
        lockStore.removeAwait(key, conditionId, getCallerUuid(), threadId);

        boolean locked = lockStore.lock(key, getCallerUuid(), threadId);
        if (locked) {
            ResponseHandler responseHandler = getResponseHandler();
            // expired & acquired lock, send FALSE
            responseHandler.sendResponse(false);
        } else {
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        response = lockStore.lock(key, originalCallerUuid, threadId, ttl);
    }

    @Override
    public int getId() {
        return LockDataSerializerHook.LOCK_BACKUP;
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        lockStore.lock(key, originalCaller, threadId);
        ConditionKey conditionKey = new ConditionKey(namespace.getObjectName(), key, conditionId);
        lockStore.removeSignalKey(conditionKey);
        lockStore.removeAwait(key, conditionId, originalCaller, threadId);
        response = true;
    }
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        if (!lockStore.lock(key, getCallerUuid(), threadId)) {
            throw new IllegalMonitorStateException(
                    "Current thread is not owner of the lock! -> " + lockStore.getOwnerInfo(key));
        }

        if (expired) {
View Full Code Here

        expired = true;
        LockStoreImpl lockStore = getLockStore();
        lockStore.removeSignalKey(getWaitKey());
        lockStore.removeAwait(key, conditionId, getCallerUuid(), threadId);

        boolean locked = lockStore.lock(key, getCallerUuid(), threadId);
        if (locked) {
            ResponseHandler responseHandler = getResponseHandler();
            // expired & acquired lock, send FALSE
            responseHandler.sendResponse(false);
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.