Class LRUByteLimitedHashtable<K,​V>

    • Constructor Detail

      • LRUByteLimitedHashtable

        public LRUByteLimitedHashtable​(long capacity)
        Parameters:
        capacity - Maximum capacity of this table in bytes
    • Method Detail

      • getObjectSize

        public long getObjectSize​(Object obj)
        Estimates the size of the object in bytes. If obj is a byte[], this returns its length; if it implements Sizeable this uses getSizeInCache(). Returns 0 for all other objects.
        Specified by:
        getObjectSize in class CapacityLimitedHashtable<K,​V>
        Parameters:
        obj - Object to estimate the byte-size of
        Returns:
        estimated byte-size