mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add ChronicleHash.offHeapMemoryUsed() method; Centralized management of all direct memory and file resources of ChronicleMap in one Cleaner
This commit is contained in:
@@ -52,6 +52,16 @@ public interface ChronicleHash<K, E extends HashEntry<K>, SC extends HashSegment
|
||||
*/
|
||||
long longSize();
|
||||
|
||||
/**
|
||||
* Returns the amount of off-heap memory (in bytes), allocated by this {@code ChronicleHash} or
|
||||
* shared with with other ChronicleHashes, persisting to the same {@link #file()}.
|
||||
*
|
||||
* <p>After {@link #close()} this method returns 0.
|
||||
*
|
||||
* @return the amount of off-heap memory, used by this {@code ChronicleHash} (in bytes)
|
||||
*/
|
||||
long offHeapMemoryUsed();
|
||||
|
||||
/**
|
||||
* @return the class of {@code <K>}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user