Search in sources :

Example 16 with UnmodifiableLazyList

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());
}
Also used : MapProjectWithPredicateCodec(com.hazelcast.client.impl.protocol.codec.MapProjectWithPredicateCodec) UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage)

Aggregations

UnmodifiableLazyList (com.hazelcast.spi.impl.UnmodifiableLazyList)16 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)14 Data (com.hazelcast.nio.serialization.Data)8 SerializationService (com.hazelcast.spi.serialization.SerializationService)4 SerializableList (com.hazelcast.spi.impl.SerializableList)2 ListGetAllCodec (com.hazelcast.client.impl.protocol.codec.ListGetAllCodec)1 ListSubCodec (com.hazelcast.client.impl.protocol.codec.ListSubCodec)1 MapProjectCodec (com.hazelcast.client.impl.protocol.codec.MapProjectCodec)1 MapProjectWithPredicateCodec (com.hazelcast.client.impl.protocol.codec.MapProjectWithPredicateCodec)1 MapValuesCodec (com.hazelcast.client.impl.protocol.codec.MapValuesCodec)1 MapValuesWithPredicateCodec (com.hazelcast.client.impl.protocol.codec.MapValuesWithPredicateCodec)1 MultiMapGetCodec (com.hazelcast.client.impl.protocol.codec.MultiMapGetCodec)1 MultiMapRemoveCodec (com.hazelcast.client.impl.protocol.codec.MultiMapRemoveCodec)1 MultiMapValuesCodec (com.hazelcast.client.impl.protocol.codec.MultiMapValuesCodec)1 ReplicatedMapValuesCodec (com.hazelcast.client.impl.protocol.codec.ReplicatedMapValuesCodec)1 SetGetAllCodec (com.hazelcast.client.impl.protocol.codec.SetGetAllCodec)1 CollectionGetAllOperation (com.hazelcast.collection.impl.collection.operations.CollectionGetAllOperation)1 ListSubOperation (com.hazelcast.collection.impl.list.operations.ListSubOperation)1 PagingPredicate (com.hazelcast.query.PagingPredicate)1 ArrayList (java.util.ArrayList)1