K - The type of the keyV - The type of the valuepublic class CacheEntrySizeCalculator<K,V> extends AbstractEntrySizeCalculatorHelper<K,InternalCacheEntry<K,V>> implements KeyValueMetadataSizeCalculator<K,V>
HEADER_AND_CLASS_REFERENCE, OBJECT_SIZE, POINTER_SIZE| Constructor and Description |
|---|
CacheEntrySizeCalculator(EntrySizeCalculator<? super K,? super V> calculator) |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateSize(K key,
InternalCacheEntry<K,V> ice)
Method used to calculate how much memory in size the key and value use.
|
long |
calculateSize(K key,
V value,
Metadata metadata,
PrivateMetadata pvtMetadata)
Method used to calculate how much memory in size the key, value and metadata use.
|
roundUpToNearest8clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateSizepublic CacheEntrySizeCalculator(EntrySizeCalculator<? super K,? super V> calculator)
public long calculateSize(K key, InternalCacheEntry<K,V> ice)
EntrySizeCalculatorcalculateSize in interface EntrySizeCalculator<K,InternalCacheEntry<K,V>>key - The key for this entry to be used in size calculationice - The value for this entry to be used in size calculationpublic long calculateSize(K key, V value, Metadata metadata, PrivateMetadata pvtMetadata)
KeyValueMetadataSizeCalculatorcalculateSize in interface KeyValueMetadataSizeCalculator<K,V>key - The key for this entry to be used in size calculationvalue - The value for this entry to be used in size calculationmetadata - The metadata for this entry to be used in size calculationpvtMetadata - The internal metadata for this entry to be used in size calculationCopyright © 2022 JBoss by Red Hat. All rights reserved.