Search in sources :

Example 26 with UnmodifiableLazyList

use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.

the class ClientListProxy method listIterator.

@Override
public ListIterator<E> listIterator(int index) {
    ClientMessage request = ListListIteratorCodec.encodeRequest(name, index);
    ClientMessage response = invokeOnPartition(request);
    List<Data> resultCollection = ListListIteratorCodec.decodeResponse(response);
    return (ListIterator<E>) new UnmodifiableLazyList(resultCollection, getSerializationService()).listIterator();
}
Also used : Data(com.hazelcast.internal.serialization.Data) UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage) ListIterator(java.util.ListIterator)

Example 27 with UnmodifiableLazyList

use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.

the class ClientListProxy method getAll.

private Collection<E> getAll() {
    ClientMessage request = ListGetAllCodec.encodeRequest(name);
    ClientMessage response = invokeOnPartition(request);
    return new UnmodifiableLazyList(ListGetAllCodec.decodeResponse(response), getSerializationService());
}
Also used : UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage)

Example 28 with UnmodifiableLazyList

use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.

the class ClientSetProxy method getAll.

private Collection<E> getAll() {
    ClientMessage request = SetGetAllCodec.encodeRequest(name);
    ClientMessage response = invokeOnPartition(request);
    return new UnmodifiableLazyList(SetGetAllCodec.decodeResponse(response), getSerializationService());
}
Also used : UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage)

Example 29 with UnmodifiableLazyList

use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.

the class ClientMultiMapProxy method values.

@Nonnull
@Override
public Collection<V> values() {
    ClientMessage request = MultiMapValuesCodec.encodeRequest(name);
    ClientMessage response = invoke(request);
    return new UnmodifiableLazyList(MultiMapValuesCodec.decodeResponse(response), getSerializationService());
}
Also used : UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage) Nonnull(javax.annotation.Nonnull)

Example 30 with UnmodifiableLazyList

use of com.hazelcast.spi.impl.UnmodifiableLazyList in project hazelcast by hazelcast.

the class ClientTxnMapProxy method values.

@Override
@SuppressWarnings("unchecked")
public Collection<V> values() {
    ClientMessage request = TransactionalMapValuesCodec.encodeRequest(name, getTransactionId(), getThreadId());
    ClientMessage response = invoke(request);
    List dataValues = TransactionalMapValuesCodec.decodeResponse(response);
    return new UnmodifiableLazyList(dataValues, getSerializationService());
}
Also used : ArrayList(java.util.ArrayList) List(java.util.List) UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) UnmodifiableLazyList(com.hazelcast.spi.impl.UnmodifiableLazyList) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage)

Aggregations

UnmodifiableLazyList (com.hazelcast.spi.impl.UnmodifiableLazyList)34 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)30 Data (com.hazelcast.internal.serialization.Data)9 Data (com.hazelcast.nio.serialization.Data)6 Nonnull (javax.annotation.Nonnull)4 SerializationService (com.hazelcast.internal.serialization.SerializationService)3 ArrayList (java.util.ArrayList)3 CollectionUtil.objectToDataCollection (com.hazelcast.internal.util.CollectionUtil.objectToDataCollection)2 SerializableList (com.hazelcast.spi.impl.SerializableList)2 SerializationService (com.hazelcast.spi.serialization.SerializationService)2 Collection (java.util.Collection)2 List (java.util.List)2 ListIterator (java.util.ListIterator)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 MapValuesWithPagingPredicateCodec (com.hazelcast.client.impl.protocol.codec.MapValuesWithPagingPredicateCodec)1 MapValuesWithPredicateCodec (com.hazelcast.client.impl.protocol.codec.MapValuesWithPredicateCodec)1