Examples of toData()


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

        return removeInternal(data);
    }

    public boolean contains(Object o) {
        final NodeEngine nodeEngine = getNodeEngine();
        final Data data = nodeEngine.toData(o);
        List<Data> dataSet = new ArrayList<Data>(1);
        dataSet.add(data);
        return containsInternal(dataSet);
    }
View Full Code Here

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

    private List<Data> getDataList(Collection<?> objects) {
        final NodeEngine nodeEngine = getNodeEngine();
        List<Data> dataList = new ArrayList<Data>(objects.size());
        for (Object o : objects) {
            dataList.add(nodeEngine.toData(o));
        }
        return dataList;
    }

}
View Full Code Here

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

    @Override
    public boolean add(E e) {
        checkTransactionState();
        throwExceptionIfNull(e);
        final NodeEngine nodeEngine = getNodeEngine();
        final Data value = nodeEngine.toData(e);
        if (!getCollection().add(new CollectionItem(-1, value))){
            return false;
        }
        CollectionReserveAddOperation operation = new CollectionReserveAddOperation(name, tx.getTxnId(), value);
        try {
View Full Code Here

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

    public boolean add(E e) {
        checkTransactionState();
        throwExceptionIfNull(e);
        final NodeEngine nodeEngine = getNodeEngine();
        final Data value = nodeEngine.toData(e);
        CollectionReserveAddOperation operation = new CollectionReserveAddOperation(name, tx.getTxnId(), null);
        try {
            Future<Long> f = nodeEngine.getOperationService().invokeOnPartition(getServiceName(), operation, partitionId);
            Long itemId = f.get();
            if (itemId != null) {
View Full Code Here

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

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

        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

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

    }

    @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

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

    @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

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

    @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

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

    @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
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.