K - the hash key typepublic interface ExternalHashQueryContext<K> extends HashQueryContext<K>, AutoCloseable
ChronicleHash.queryContext(Object)| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the query context, automatically releases all locks and disposes all resources,
acquired during the query operation.
|
absentEntry, entry, queriedKey, segmentIndexhashreadLock, updateLock, writeLockvoid close()
try (ExternalHashQueryContext<K> q = hash.queryContext(key))
q.writeLock().lock();
// ...make a query under exclusive lock
// NOT NEEDED - q.readLock().unlock();
}close in interface AutoCloseableCopyright © 2019. All rights reserved.