Package org.infinispan.marshall.core
Class WrappedByteArraySizeCalculator<K,V>
java.lang.Object
org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<K,V>
org.infinispan.marshall.core.WrappedByteArraySizeCalculator<K,V>
- All Implemented Interfaces:
EntrySizeCalculator<K,
V>
Size calculator that supports a
WrappedByteArray
by adding its size and the underlying byte[].- Since:
- 9.0
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper
HEADER_AND_CLASS_REFERENCE, OBJECT_SIZE, POINTER_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
calculateSize
(K key, V value) Method used to calculate how much memory in size the key and value use.Methods inherited from class org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper
roundUpToNearest8
-
Constructor Details
-
WrappedByteArraySizeCalculator
-
-
Method Details
-
calculateSize
Description copied from interface:EntrySizeCalculator
Method used to calculate how much memory in size the key and value use.- Parameters:
key
- The key for this entry to be used in size calculationvalue
- The value for this entry to be used in size calculation- Returns:
- The size approximately in memory the key and value use
-