Examples of AwaitOperation


Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return new DataSerializableFactory() {
            @Override
            public IdentifiedDataSerializable create(int typeId) {
                switch (typeId) {
                    case AWAIT_OPERATION:
                        return new AwaitOperation();
                    case COUNT_DOWN_LATCH_BACKUP_OPERATION:
                        return new CountDownLatchBackupOperation();
                    case COUNT_DOWN_LATCH_REPLICATION_OPERATION:
                        return new CountDownLatchReplicationOperation();
                    case COUNT_DOWN_OPERATION:
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return name;
    }

    @Override
    public boolean await(long timeout, TimeUnit unit) throws InterruptedException {
        AwaitOperation op = new AwaitOperation(name, getTimeInMillis(timeout, unit));
        Future<Boolean> f = invoke(op);
        try {
            return f.get();
        } catch (ExecutionException e) {
            throw rethrowAllowInterrupted(e);
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return name;
    }

    @Override
    protected Operation prepareOperation() {
        return new AwaitOperation(name, timeout);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return name;
    }

    @Override
    protected Operation prepareOperation() {
        return new AwaitOperation(name, timeout);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return name;
    }

    @Override
    protected Operation prepareOperation() {
        return new AwaitOperation(name, timeout);
    }
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.operations.AwaitOperation

        return name;
    }

    @Override
    public boolean await(long timeout, TimeUnit unit) throws InterruptedException {
        AwaitOperation op = new AwaitOperation(name, getTimeInMillis(timeout, unit));
        Future<Boolean> f = invoke(op);
        try {
            return f.get();
        } catch (ExecutionException e) {
            throw rethrowAllowInterrupted(e);
View Full Code Here

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

    }

    @Override
    protected Operation prepareOperation() {
        final Data key = getClientEngine().toData(name);
        return new AwaitOperation(namespace, key, threadId, timeout, conditionId);
    }
View Full Code Here

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

        if (isNullOrEmpty(ops)) {
            return null;
        }

        Iterator<AwaitOperation> iterator = ops.iterator();
        AwaitOperation awaitResponse = iterator.next();
        iterator.remove();
        return awaitResponse;
    }
View Full Code Here

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

        len = in.readInt();
        if (len > 0) {
            expiredAwaitOps = new ArrayList<AwaitOperation>(len);
            for (int i = 0; i < len; i++) {
                AwaitOperation op = new AwaitOperation();
                op.readData(in);
                expiredAwaitOps.add(op);
            }
        }
    }
View Full Code Here

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

    private boolean doAwait(long time, TimeUnit unit, long threadId) throws InterruptedException {
        try {
            long timeout = unit.toMillis(time);
            Data key = lockProxy.getKeyData();
            AwaitOperation op = new AwaitOperation(namespace, key, threadId, timeout, conditionId);
            Future f = invoke(op);
            return Boolean.TRUE.equals(f.get());
        } catch (Throwable t) {
            throw rethrowAllowInterrupted(t);
        }
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.