Package com.hazelcast.spi

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


        response = input;
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = !isEquals(input, output);
        if (shouldBackup) {
            backup = nodeEngine.toData(output);
            reference.set(backup);
        }
    }
}
View Full Code Here


        ReferenceWrapper reference = getReference();

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        returnValue = nodeEngine.toData(output);
    }

    @Override
    public Object getResponse() {
        return returnValue;
View Full Code Here

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = true;
        backup = nodeEngine.toData(output);
        reference.set(backup);
        response = output;
    }
}
View Full Code Here

        Object input = nodeEngine.toObject(reference.get());
        //noinspection unchecked
        Object output = f.apply(input);
        shouldBackup = !isEquals(input, output);
        if (shouldBackup) {
            backup = nodeEngine.toData(output);
            reference.set(backup);
        }
    }
}
View Full Code Here

        offer(e, -1, TimeUnit.MILLISECONDS);
    }

    public boolean offer(E e, long timeout, TimeUnit timeUnit) throws InterruptedException {
        final NodeEngine nodeEngine = getNodeEngine();
        final Data data = nodeEngine.toData(e);
        return offerInternal(data, timeUnit.toMillis(timeout));
    }

    public E take() throws InterruptedException {
        return poll(-1, TimeUnit.MILLISECONDS);
View Full Code Here

        return config.getMaxSize() - size();
    }

    public boolean remove(Object o) {
        final NodeEngine nodeEngine = getNodeEngine();
        final Data data = nodeEngine.toData(o);
        return removeInternal(data);
    }

    public boolean contains(Object o) {
        final NodeEngine nodeEngine = getNodeEngine();
View Full Code Here

        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

    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

    @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

    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

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.