Search in sources :

Example 1 with ListProxyImpl

use of com.hazelcast.collection.impl.list.ListProxyImpl in project hazelcast by hazelcast.

the class ReadIListP method createTraverser.

@SuppressWarnings("rawtypes")
private Traverser<Data> createTraverser(HazelcastInstance instance, String name) {
    IList<Data> list = instance.getList(name);
    int size = list.size();
    if (list instanceof ClientListProxy) {
        ClientListProxy proxy = (ClientListProxy) list;
        return createTraverser(size, proxy::dataSubList);
    } else if (list instanceof ListProxyImpl) {
        ListProxyImpl proxy = (ListProxyImpl) list;
        return createTraverser(size, proxy::dataSubList);
    } else {
        throw new RuntimeException("Unexpected list class: " + list.getClass().getName());
    }
}
Also used : ClientListProxy(com.hazelcast.client.impl.proxy.ClientListProxy) ListProxyImpl(com.hazelcast.collection.impl.list.ListProxyImpl) Data(com.hazelcast.internal.serialization.Data)

Aggregations

ClientListProxy (com.hazelcast.client.impl.proxy.ClientListProxy)1 ListProxyImpl (com.hazelcast.collection.impl.list.ListProxyImpl)1 Data (com.hazelcast.internal.serialization.Data)1