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, segmentIndex
hash
readLock, updateLock, writeLock
void 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 AutoCloseable
Copyright © 2022. All rights reserved.