Package com.hazelcast.spi

Examples of com.hazelcast.spi.Operation


    }

    @Override
    public InternalCompletableFuture<Void> asyncSet(E newValue) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new SetOperation(name, nodeEngine.toData(newValue));
        return asyncInvoke(operation, nodeEngine);
    }
View Full Code Here


    }

    @Override
    public InternalCompletableFuture<E> asyncGetAndSet(E newValue) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new GetAndSetOperation(name, nodeEngine.toData(newValue));
        return asyncInvoke(operation, nodeEngine);
    }
View Full Code Here

    }

    @Override
    public InternalCompletableFuture<E> asyncSetAndGet(E update) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new SetAndGetOperation(name, nodeEngine.toData(update));
        return asyncInvoke(operation, nodeEngine);
    }
View Full Code Here

        return asyncIsNull().getSafely();
    }

    @Override
    public InternalCompletableFuture<Boolean> asyncIsNull() {
        Operation operation = new IsNullOperation(name);
        return asyncInvoke(operation, getNodeEngine());
    }
View Full Code Here

        private boolean isOperationExecuting(Address target) {
            // ask if op is still being executed?
            Boolean executing = Boolean.FALSE;
            try {
                Operation isStillExecuting;
                if (op instanceof TraceableOperation) {
                    TraceableOperation traceable = (TraceableOperation) op;
                    isStillExecuting = new TraceableIsStillExecuting(serviceName, traceable.getTraceIdentifier());
                } else {
                    isStillExecuting = new IsStillExecuting(op.getCallId());
View Full Code Here

        }
        return futures;
    }

    private void sendUnlockOperation(Collection<Future> futures, Data key) {
        Operation operation = new UnlockOperation(namespace, key, -1, true);
        try {
            Future f = invoke(operation, key);
            futures.add(f);
        } catch (Throwable t) {
            ILogger logger = nodeEngine.getLogger(getClass());
View Full Code Here

        InternalCompletableFuture<Boolean> f = invoke(nodeEngine, operation, key);
        return f.getSafely();
    }

    public int getLockCount(NodeEngine nodeEngine, Data key) {
        Operation operation = new GetLockCountOperation(namespace, key);
        InternalCompletableFuture<Number> f = invoke(nodeEngine, operation, key);
        return f.getSafely().intValue();
    }
View Full Code Here

        InternalCompletableFuture<Number> f = invoke(nodeEngine, operation, key);
        return f.getSafely().intValue();
    }

    public long getRemainingLeaseTime(NodeEngine nodeEngine, Data key) {
        Operation operation = new GetRemainingLeaseTimeOperation(namespace, key);
        InternalCompletableFuture<Number> f = invoke(nodeEngine, operation, key);
        return f.getSafely().longValue();
    }
View Full Code Here

        for (String name : permitMap.keySet()) {
            int partitionId = partitionService.getPartitionId(getPartitionKey(name));
            InternalPartition partition = partitionService.getPartition(partitionId);

            if (thisAddress.equals(partition.getOwner())) {
                Operation op = new SemaphoreDeadMemberOperation(name, caller)
                        .setPartitionId(partitionId)
                        .setResponseHandler(createEmptyResponseHandler())
                        .setService(this)
                        .setNodeEngine(nodeEngine)
                        .setServiceName(SERVICE_NAME);
View Full Code Here

        BufferObjectDataInput in = serializationService.createObjectDataInput(toData());
        try {
            int size = in.readInt();
            tasks = new ArrayList<Operation>(size);
            for (int i = 0; i < size; i++) {
                Operation task = (Operation) serializationService.readObject(in);
                tasks.add(task);
            }
        } finally {
            closeResource(in);
        }
View Full Code Here

TOP

Related Classes of com.hazelcast.spi.Operation

Copyright © 2018 www.massapicom. 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.