Search in sources :

Example 11 with IterationPointer

use of com.hazelcast.internal.iteration.IterationPointer in project hazelcast by hazelcast.

the class AbstractCursor method readData.

@Override
public void readData(ObjectDataInput in) throws IOException {
    int pointersCount = in.readInt();
    pointers = new IterationPointer[pointersCount];
    for (int i = 0; i < pointersCount; i++) {
        pointers[i] = new IterationPointer(in.readInt(), in.readInt());
    }
    int size = in.readInt();
    objects = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        objects.add(readElement(in));
    }
}
Also used : IterationPointer(com.hazelcast.internal.iteration.IterationPointer)

Example 12 with IterationPointer

use of com.hazelcast.internal.iteration.IterationPointer in project hazelcast by hazelcast.

the class CacheFetchEntriesOperation method readInternal.

@Override
protected void readInternal(ObjectDataInput in) throws IOException {
    super.readInternal(in);
    final int pointersCount = in.readInt();
    pointers = new IterationPointer[pointersCount];
    for (int i = 0; i < pointersCount; i++) {
        pointers[i] = new IterationPointer(in.readInt(), in.readInt());
    }
    fetchSize = in.readInt();
}
Also used : IterationPointer(com.hazelcast.internal.iteration.IterationPointer)

Example 13 with IterationPointer

use of com.hazelcast.internal.iteration.IterationPointer in project hazelcast by hazelcast.

the class CacheEntriesWithCursor method readData.

@Override
public void readData(ObjectDataInput in) throws IOException {
    int pointersCount = in.readInt();
    pointers = new IterationPointer[pointersCount];
    for (int i = 0; i < pointersCount; i++) {
        pointers[i] = new IterationPointer(in.readInt(), in.readInt());
    }
    int size = in.readInt();
    entries = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        Data key = IOUtil.readData(in);
        Data value = IOUtil.readData(in);
        entries.add(new AbstractMap.SimpleEntry<Data, Data>(key, value));
    }
}
Also used : AbstractMap(java.util.AbstractMap) IterationPointer(com.hazelcast.internal.iteration.IterationPointer) Data(com.hazelcast.internal.serialization.Data)

Example 14 with IterationPointer

use of com.hazelcast.internal.iteration.IterationPointer in project hazelcast by hazelcast.

the class CacheEntriesWithCursor method writeData.

@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeInt(pointers.length);
    for (IterationPointer pointer : pointers) {
        out.writeInt(pointer.getIndex());
        out.writeInt(pointer.getSize());
    }
    int size = entries.size();
    out.writeInt(size);
    for (Map.Entry<Data, Data> entry : entries) {
        IOUtil.writeData(out, entry.getKey());
        IOUtil.writeData(out, entry.getValue());
    }
}
Also used : IterationPointer(com.hazelcast.internal.iteration.IterationPointer) Data(com.hazelcast.internal.serialization.Data) AbstractMap(java.util.AbstractMap) Map(java.util.Map)

Example 15 with IterationPointer

use of com.hazelcast.internal.iteration.IterationPointer in project hazelcast by hazelcast.

the class CacheIterateMessageTask method prepareOperation.

@Override
protected Operation prepareOperation() {
    CacheOperationProvider operationProvider = getOperationProvider(parameters.name);
    IterationPointer[] pointers = decodePointers(parameters.iterationPointers);
    return operationProvider.createFetchKeysOperation(pointers, parameters.batch);
}
Also used : IterationPointer(com.hazelcast.internal.iteration.IterationPointer) CacheOperationProvider(com.hazelcast.cache.impl.CacheOperationProvider)

Aggregations

IterationPointer (com.hazelcast.internal.iteration.IterationPointer)37 Data (com.hazelcast.internal.serialization.Data)9 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)4 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)4 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)4 AbstractMap (java.util.AbstractMap)4 ArrayList (java.util.ArrayList)4 MapOperationProvider (com.hazelcast.map.impl.operation.MapOperationProvider)3 Map (java.util.Map)3 CacheEntriesWithCursor (com.hazelcast.cache.impl.CacheEntriesWithCursor)2 HazelcastClientInstanceImpl (com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl)2 SampleableConcurrentHashMap (com.hazelcast.internal.util.SampleableConcurrentHashMap)2 MapEntriesWithCursor (com.hazelcast.map.impl.iterator.MapEntriesWithCursor)2 CacheKeysWithCursor (com.hazelcast.cache.impl.CacheKeysWithCursor)1 CacheOperationProvider (com.hazelcast.cache.impl.CacheOperationProvider)1 CacheIterateCodec (com.hazelcast.client.impl.protocol.codec.CacheIterateCodec)1 CacheIterateEntriesCodec (com.hazelcast.client.impl.protocol.codec.CacheIterateEntriesCodec)1 MapFetchEntriesCodec (com.hazelcast.client.impl.protocol.codec.MapFetchEntriesCodec)1 MapFetchKeysCodec (com.hazelcast.client.impl.protocol.codec.MapFetchKeysCodec)1 MapFetchWithQueryCodec (com.hazelcast.client.impl.protocol.codec.MapFetchWithQueryCodec)1