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));
}
}
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();
}
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));
}
}
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());
}
}
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);
}
Aggregations