Improved documentation

This commit is contained in:
leventov
2015-05-27 04:30:58 +01:00
parent b4c8554b77
commit 4fb73bb821
28 changed files with 319 additions and 42 deletions
@@ -2,6 +2,12 @@ package net.openhft.chronicle.hash;
import net.openhft.chronicle.hash.locks.InterProcessReadWriteUpdateLock;
/**
* Context of {@link ChronicleHash} operations with <i>individual keys</i>.
*
* @param <K> the hash key type
* @see ChronicleHash#queryContext(Object)
*/
public interface HashQueryContext<K> extends HashContext<K>, InterProcessReadWriteUpdateLock {
/**
@@ -10,16 +16,20 @@ public interface HashQueryContext<K> extends HashContext<K>, InterProcessReadWri
Value<K, ?> queriedKey();
/**
* Returns the entry access object, if the entry with the queried key is <i>present</i>
* in the hash, returns {@code null} is the entry is <i>absent</i>. Might acquire
* {@link #readLock} before searching for the key, if the context is not locked yet.
* Returns the entry context, if the entry with the queried key is <i>present</i>
* in the {@code ChronicleHash}, returns {@code null} is the entry is <i>absent</i>.
*
* @implNote Might acquire {@link #readLock} before searching for the key, if the context
* is not locked yet.
*/
HashEntry<K> entry();
/**
* Returns the special <i>absent entry</i> object, if the entry with the queried key
* is <i>absent</i> in the hash, returns {@code null}, if the entry is <i>present</i>. Might
* acquire {@link #readLock} before searching for the key, if the context is not locked yet.
* is <i>absent</i> in the hash, returns {@code null}, if the entry is <i>present</i>.
*
* @implNote Might acquire {@link #readLock} before searching for the key, if the context
* is not locked yet.
*/
HashAbsentEntry<K> absentEntry();
}