Package org.infinispan.container.entries
Class PrimitiveEntrySizeCalculator
java.lang.Object
org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<Object,Object>
org.infinispan.container.entries.PrimitiveEntrySizeCalculator
- All Implemented Interfaces:
EntrySizeCalculator<Object,
Object>
Entry Size calculator that returns an approximation of how much various primitives, primitive wrappers, Strings,
and arrays
- Since:
- 8.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
(Object key, Object value) Method used to calculate how much memory in size the key and value use.protected long
handleObject
(Object object) Methods inherited from class org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper
roundUpToNearest8
-
Constructor Details
-
PrimitiveEntrySizeCalculator
public PrimitiveEntrySizeCalculator()
-
-
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
-
handleObject
-