use of com.hazelcast.client.impl.protocol.codec.holder.PagingPredicateHolder in project hazelcast by hazelcast.
the class ClientMapProxy method keySetWithPagingPredicate.
@SuppressWarnings("unchecked")
private Set keySetWithPagingPredicate(Predicate predicate) {
PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate);
pagingPredicate.setIterationType(IterationType.KEY);
PagingPredicateHolder pagingPredicateHolder = PagingPredicateHolder.of(predicate, getSerializationService());
ClientMessage request = MapKeySetWithPagingPredicateCodec.encodeRequest(name, pagingPredicateHolder);
ClientMessage response = invokeWithPredicate(request, predicate);
MapKeySetWithPagingPredicateCodec.ResponseParameters resultParameters = MapKeySetWithPagingPredicateCodec.decodeResponse(response);
SerializationService serializationService = getSerializationService();
pagingPredicate.setAnchorList(resultParameters.anchorDataList.asAnchorList(serializationService));
return new UnmodifiableLazySet(resultParameters.response, serializationService);
}
use of com.hazelcast.client.impl.protocol.codec.holder.PagingPredicateHolder in project hazelcast by hazelcast.
the class ClientMapProxy method entrySetWithPagingPredicate.
private Set entrySetWithPagingPredicate(Predicate predicate) {
PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate);
pagingPredicate.setIterationType(IterationType.ENTRY);
PagingPredicateHolder pagingPredicateHolder = PagingPredicateHolder.of(predicate, getSerializationService());
ClientMessage request = MapEntriesWithPagingPredicateCodec.encodeRequest(name, pagingPredicateHolder);
ClientMessage response = invokeWithPredicate(request, predicate);
MapEntriesWithPagingPredicateCodec.ResponseParameters resultParameters = MapEntriesWithPagingPredicateCodec.decodeResponse(response);
pagingPredicate.setAnchorList(resultParameters.anchorDataList.asAnchorList(getSerializationService()));
return getEntriesAsImmutableLazySet(resultParameters.response);
}
use of com.hazelcast.client.impl.protocol.codec.holder.PagingPredicateHolder 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);
}
Aggregations