package net.openhft.chronicle.hash; import net.openhft.chronicle.hash.locks.InterProcessReadWriteUpdateLock; /** * Context of {@link ChronicleHash} operations with individual keys. * * @param the hash key type * @see ChronicleHash#queryContext(Object) */ public interface HashQueryContext extends HashContext, InterProcessReadWriteUpdateLock { /** * Returns the queried key as a {@code Value}. */ Value queriedKey(); /** * Returns the entry context, if the entry with the queried key is present * in the {@code ChronicleHash}, returns {@code null} is the entry is absent. * * @implNote Might acquire {@link #readLock} before searching for the key, if the context * is not locked yet. */ HashEntry entry(); /** * Returns the special absent entry object, if the entry with the queried key * is absent in the hash, returns {@code null}, if the entry is present. * * @implNote Might acquire {@link #readLock} before searching for the key, if the context * is not locked yet. */ HashAbsentEntry absentEntry(); }