use of org.apache.ignite.internal.processors.platform.PlatformTargetProxy in project ignite by apache.
the class PlatformStreamReceiverImpl method receive.
/**
* {@inheritDoc}
*/
@Override
public void receive(IgniteCache<Object, Object> cache, Collection<Map.Entry<Object, Object>> collection) throws IgniteException {
assert ctx != null;
try (PlatformMemory mem = ctx.memory().allocate()) {
PlatformOutputStream out = mem.output();
out.writeLong(ptr);
out.writeBoolean(keepBinary);
BinaryRawWriterEx writer = ctx.writer(out);
writer.writeObject(pred);
writer.writeInt(collection.size());
for (Map.Entry<Object, Object> e : collection) {
writer.writeObject(e.getKey());
writer.writeObject(e.getValue());
}
out.synchronize();
PlatformCache cache0 = new PlatformCache(ctx, cache, keepBinary);
PlatformTargetProxy cacheProxy = new PlatformTargetProxyImpl(cache0, ctx);
ctx.gateway().dataStreamerStreamReceiverInvoke(ptr, cacheProxy, mem.pointer(), keepBinary);
}
}
Aggregations