Add methods for Engine support

This commit is contained in:
leventov
2015-12-18 03:00:38 +03:00
parent 5280dc2b60
commit 3773b3d60a
19 changed files with 427 additions and 29 deletions
@@ -17,10 +17,12 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.bytes.Bytes;
import net.openhft.chronicle.bytes.BytesStore;
import net.openhft.chronicle.core.io.Closeable;
import net.openhft.chronicle.hash.Data;
import net.openhft.chronicle.hash.impl.VanillaChronicleHash;
import net.openhft.chronicle.hash.impl.stage.hash.ChainingInterface;
import net.openhft.chronicle.hash.impl.util.Objects;
import net.openhft.chronicle.hash.serialization.DataAccess;
import net.openhft.chronicle.hash.serialization.SizeMarshaller;
import net.openhft.chronicle.hash.serialization.SizedReader;
@@ -291,6 +293,16 @@ public class VanillaChronicleMap<K, V, R>
return q;
}
@NotNull
@Override
public ExternalMapQueryContext<K, V, ?> queryContext(
BytesStore keyBytes, long offset, long size) {
Objects.requireNonNull(keyBytes);
QueryContextInterface<K, V, R> q = mapContext();
q.initInputKey(q.getInputKeyBytesAsData(keyBytes, offset, size));
return q;
}
@Override
public MapSegmentContext<K, V, ?> segmentContext(int segmentIndex) {
IterationContext<K, V, ?> c = iterationContext();