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
@@ -16,6 +16,7 @@
package net.openhft.chronicle.hash;
import net.openhft.chronicle.bytes.BytesStore;
import net.openhft.chronicle.map.ChronicleMap;
import net.openhft.chronicle.map.MapMethods;
import net.openhft.chronicle.map.MapQueryContext;
@@ -80,6 +81,18 @@ public interface ChronicleHash<K, E extends HashEntry<K>, SC extends HashSegment
*/
@NotNull EQC queryContext(Data<K> key);
/**
* Returns the context to perform arbitrary operations with the given key, provided in the
* serialized form. See {@link #queryContext(Object)} and {@link #queryContext(Data)} for more
* information on contexts semantics and usage patterns.
*
* @param keyBytes the bytes store with the key bytes to query
* @param offset actual offset of the key bytes within the given BytesStore
* @param size length of the key bytes sequence
* @return the context to perform operations with the key
*/
@NotNull EQC queryContext(BytesStore keyBytes, long offset, long size);
/**
* Returns the context of the segment with the given index. Segments are indexed from 0 to
* {@link #segments()}{@code - 1}.