Examples of LockOperation


Examples of ch.entwine.weblounge.common.repository.LockOperation

      throws IOException, ContentRepositoryException, IllegalStateException {

    if (!isStarted())
      throw new IllegalStateException("Content repository is not connected");

    LockOperation lockOperation = new LockOperationImpl(uri, user);
    processor.enqueue(lockOperation);
    return lockOperation;
  }
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

        return (String) getClientEngine().toObject(key);
    }

    @Override
    protected final Operation prepareOperation() {
        return new LockOperation(getNamespace(), key, threadId, ttl, timeout);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

    public void lock(NodeEngine nodeEngine, Data key) {
        lock(nodeEngine, key, -1);
    }

    public void lock(NodeEngine nodeEngine, Data key, long ttl) {
        LockOperation operation = new LockOperation(namespace, key, getThreadId(), ttl, -1);
        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
        if (!f.getSafely()) {
            throw new IllegalStateException();
        }
    }
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

        }
    }

    public boolean tryLock(NodeEngine nodeEngine, Data key, long timeout, TimeUnit timeunit)
            throws InterruptedException {
        LockOperation operation = new LockOperation(namespace, key, getThreadId(),
                getTimeInMillis(timeout, timeunit));
        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);

        try {
            return f.get();
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

        return serializationService.toObject(key);
    }

    @Override
    protected final Operation prepareOperation() {
        return new LockOperation(getNamespace(), key, threadId, ttl, timeout);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

    public void lock(NodeEngine nodeEngine, Data key) {
        lock(nodeEngine, key, -1);
    }

    public void lock(NodeEngine nodeEngine, Data key, long ttl) {
        LockOperation operation = new LockOperation(namespace, key, getThreadId(), ttl, -1);
        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
        if (!f.getSafely()) {
            throw new IllegalStateException();
        }
    }
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

    public void lockInterruptly(NodeEngine nodeEngine, Data key) throws InterruptedException {
        lockInterruptly(nodeEngine, key, -1);
    }

    public void lockInterruptly(NodeEngine nodeEngine, Data key, long ttl) throws InterruptedException {
        LockOperation operation = new LockOperation(namespace, key, getThreadId(), ttl, -1);
        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
        try {
            f.get();
        } catch (Throwable t) {
            throw rethrowAllowInterrupted(t);
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

            return false;
        }
    }

    public boolean tryLock(NodeEngine nodeEngine, Data key, long timeout, TimeUnit timeunit) throws InterruptedException {
        LockOperation operation = new LockOperation(namespace, key, getThreadId(),
                getTimeInMillis(timeout, timeunit));
        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);

        try {
            return f.get();
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

                    case GET_REMAINING_LEASETIME:
                        return new GetRemainingLeaseTimeOperation();
                    case IS_LOCKED:
                        return new IsLockedOperation();
                    case LOCK:
                        return new LockOperation();
                    case LOCK_BACKUP:
                        return new LockBackupOperation();
                    case LOCK_REPLICATION:
                        return new LockReplicationOperation();
                    case SIGNAL_BACKUP:
View Full Code Here

Examples of com.hazelcast.concurrent.lock.operations.LockOperation

        return serializationService.toObject(key);
    }

    @Override
    protected final Operation prepareOperation() {
        return new LockOperation(getNamespace(), key, threadId, ttl, timeout);
    }
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.