Search in sources :

Example 26 with IterationPointer

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

the class AbstractCursor 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());
    }
    out.writeInt(objects.size());
    for (T entry : objects) {
        writeElement(out, entry);
    }
}
Also used : IterationPointer(com.hazelcast.internal.iteration.IterationPointer)

Example 27 with IterationPointer

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

the class MapFetchWithQueryOperation method readInternal.

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

Example 28 with IterationPointer

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

the class MapFetchKeysOperation method readInternal.

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

Example 29 with IterationPointer

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

the class ResultSegment method readData.

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

Example 30 with IterationPointer

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

the class StorageImpl method fetchEntries.

@Override
public MapEntriesWithCursor fetchEntries(IterationPointer[] pointers, int size) {
    List<Map.Entry<Data, R>> entries = new ArrayList<>(size);
    IterationPointer[] newPointers = records.fetchEntries(pointers, size, entries);
    List<Map.Entry<Data, Data>> entriesData = new ArrayList<>(entries.size());
    for (Map.Entry<Data, R> entry : entries) {
        R record = entry.getValue();
        Data dataValue = serializationService.toData(record.getValue());
        entriesData.add(new AbstractMap.SimpleEntry<>(entry.getKey(), dataValue));
    }
    return new MapEntriesWithCursor(entriesData, newPointers);
}
Also used : ArrayList(java.util.ArrayList) MapEntriesWithCursor(com.hazelcast.map.impl.iterator.MapEntriesWithCursor) Data(com.hazelcast.internal.serialization.Data) AbstractMap(java.util.AbstractMap) IterationPointer(com.hazelcast.internal.iteration.IterationPointer) AbstractMap(java.util.AbstractMap) Map(java.util.Map)

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