Package com.hazelcast.spi

Examples of com.hazelcast.spi.NodeEngine.toData()


    public boolean remove(E e) {
        checkTransactionState();
        throwExceptionIfNull(e);
        final NodeEngine nodeEngine = getNodeEngine();
        final Data value = nodeEngine.toData(e);
        final Iterator<CollectionItem> iterator = getCollection().iterator();
        long reservedItemId = -1;
        while (iterator.hasNext()){
            final CollectionItem item = iterator.next();
            if (value.equals(item.getValue())){
View Full Code Here


        throwExceptionIfNull(c);
        List<Data> valueList = new ArrayList<Data>(c.size());
        final NodeEngine nodeEngine = getNodeEngine();
        for (E e : c) {
            throwExceptionIfNull(e);
            valueList.add(nodeEngine.toData(e));
        }
        final ListAddAllOperation operation = new ListAddAllOperation(name, index, valueList);
        final Boolean result = invoke(operation);
        return result;
    }
View Full Code Here

    }

    @Override
    public void publish(Object message) {
        NodeEngine nodeEngine = getNodeEngine();
        PublishOperation operation = new PublishOperation(getName(), nodeEngine.toData(message));
        InternalCompletableFuture f = operationService.invokeOnPartition(TopicService.SERVICE_NAME, operation, partitionId);
        f.getSafely();
    }
}
View Full Code Here

    @Override
    public InternalCompletableFuture<Void> asyncAlter(IFunction<E, E> function) {
        isNotNull(function, "function");

        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new AlterOperation(name, nodeEngine.toData(function));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public E alterAndGet(IFunction<E, E> function) {
View Full Code Here

    @Override
    public InternalCompletableFuture<E> asyncAlterAndGet(IFunction<E, E> function) {
        isNotNull(function, "function");

        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new AlterAndGetOperation(name, nodeEngine.toData(function));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public E getAndAlter(IFunction<E, E> function) {
View Full Code Here

    @Override
    public InternalCompletableFuture<E> asyncGetAndAlter(IFunction<E, E> function) {
        isNotNull(function, "function");

        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new GetAndAlterOperation(name, nodeEngine.toData(function));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public <R> R apply(IFunction<E, R> function) {
View Full Code Here

    @Override
    public <R> InternalCompletableFuture<R> asyncApply(IFunction<E, R> function) {
        isNotNull(function, "function");

        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new ApplyOperation(name, nodeEngine.toData(function));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public void clear() {
View Full Code Here

    }

    @Override
    public InternalCompletableFuture<Boolean> asyncCompareAndSet(E expect, E update) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new CompareAndSetOperation(name, nodeEngine.toData(expect), nodeEngine.toData(update));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public E get() {
View Full Code Here

    }

    @Override
    public InternalCompletableFuture<Boolean> asyncCompareAndSet(E expect, E update) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new CompareAndSetOperation(name, nodeEngine.toData(expect), nodeEngine.toData(update));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public E get() {
View Full Code Here

    }

    @Override
    public InternalCompletableFuture<Boolean> asyncContains(E value) {
        NodeEngine nodeEngine = getNodeEngine();
        Operation operation = new ContainsOperation(name, nodeEngine.toData(value));
        return asyncInvoke(operation, nodeEngine);
    }

    @Override
    public void set(E newValue) {
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.