use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientMapProxy method valuesForPagingPredicate.
@SuppressWarnings("unchecked")
private Collection<V> valuesForPagingPredicate(Predicate predicate) {
PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate);
pagingPredicate.setIterationType(IterationType.VALUE);
PagingPredicateHolder pagingPredicateHolder = PagingPredicateHolder.of(predicate, getSerializationService());
ClientMessage request = MapValuesWithPagingPredicateCodec.encodeRequest(name, pagingPredicateHolder);
ClientMessage response = invokeWithPredicate(request, predicate);
MapValuesWithPagingPredicateCodec.ResponseParameters resultParameters = MapValuesWithPagingPredicateCodec.decodeResponse(response);
SerializationService serializationService = getSerializationService();
pagingPredicate.setAnchorList(resultParameters.anchorDataList.asAnchorList(serializationService));
return (Collection<V>) new UnmodifiableLazyList(resultParameters.response, serializationService);
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientTxnMultiMapProxy method remove.
@Override
public Collection<V> remove(Object key) {
ClientMessage request = TransactionalMultiMapRemoveCodec.encodeRequest(name, getTransactionId(), getThreadId(), toData(key));
ClientMessage response = invoke(request);
List<Data> collection = TransactionalMultiMapRemoveCodec.decodeResponse(response);
return new UnmodifiableLazyList(collection, getSerializationService());
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ListProxyImpl method subList.
@Override
public List<E> subList(int fromIndex, int toIndex) {
ListSubOperation operation = new ListSubOperation(name, fromIndex, toIndex);
SerializableList result = invoke(operation);
List<Data> collection = result.getCollection();
SerializationService serializationService = getNodeEngine().getSerializationService();
return new UnmodifiableLazyList(collection, serializationService);
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class UnmodifiableLazyListTest method testIsEmpty_True.
@Test
public void testIsEmpty_True() {
list = new UnmodifiableLazyList(Collections.emptyList(), serializationService);
assertTrue(list.isEmpty());
}
Aggregations