use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientListProxy method subList.
@Override
public List<E> subList(int fromIndex, int toIndex) {
ClientMessage request = ListSubCodec.encodeRequest(name, fromIndex, toIndex);
ClientMessage response = invokeOnPartition(request);
ListSubCodec.ResponseParameters resultParameters = ListSubCodec.decodeResponse(response);
List<Data> resultCollection = resultParameters.response;
SerializationService serializationService = getContext().getSerializationService();
return new UnmodifiableLazyList<E>(resultCollection, serializationService);
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientMapProxy method project.
@Override
public <R> Collection<R> project(Projection<Entry<K, V>, R> projection, Predicate<K, V> predicate) {
ClientMessage request = MapProjectWithPredicateCodec.encodeRequest(name, toData(projection), toData(predicate));
ClientMessage response = invoke(request);
MapProjectWithPredicateCodec.ResponseParameters resultParameters = MapProjectWithPredicateCodec.decodeResponse(response);
return new UnmodifiableLazyList<R>(resultParameters.response, getSerializationService());
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientMapProxy method project.
@Override
public <R> Collection<R> project(@Nonnull Projection<? super Entry<K, V>, R> projection, @Nonnull Predicate<K, V> predicate) {
checkNotNull(projection, NULL_PROJECTION_IS_NOT_ALLOWED);
checkNotNull(predicate, NULL_PREDICATE_IS_NOT_ALLOWED);
checkNotPagingPredicate(predicate, "project");
ClientMessage request = MapProjectWithPredicateCodec.encodeRequest(name, toData(projection), toData(predicate));
ClientMessage response = invokeWithPredicate(request, predicate);
return new UnmodifiableLazyList(MapProjectWithPredicateCodec.decodeResponse(response), getSerializationService());
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientMapProxy method values.
@Override
public Collection<V> values(@Nonnull Predicate predicate) {
checkNotNull(predicate, NULL_PREDICATE_IS_NOT_ALLOWED);
if (containsPagingPredicate(predicate)) {
return valuesForPagingPredicate(predicate);
}
ClientMessage request = MapValuesWithPredicateCodec.encodeRequest(name, toData(predicate));
ClientMessage response = invokeWithPredicate(request, predicate);
List<Data> dataList = MapValuesWithPredicateCodec.decodeResponse(response);
return (Collection<V>) new UnmodifiableLazyList(dataList, getSerializationService());
}
use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.
the class ClientListProxy method iterator.
@Override
public Iterator<E> iterator() {
ClientMessage request = ListIteratorCodec.encodeRequest(name);
ClientMessage response = invokeOnPartition(request);
List<Data> resultCollection = ListIteratorCodec.decodeResponse(response);
return (Iterator<E>) new UnmodifiableLazyList(resultCollection, getSerializationService()).iterator();
}
Aggregations