Package org.infinispan.container.entries
Class PrimitiveEntrySizeCalculator
- java.lang.Object
-
- org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<java.lang.Object,java.lang.Object>
-
- org.infinispan.container.entries.PrimitiveEntrySizeCalculator
-
- All Implemented Interfaces:
EntrySizeCalculator<java.lang.Object,java.lang.Object>
public class PrimitiveEntrySizeCalculator extends AbstractEntrySizeCalculatorHelper<java.lang.Object,java.lang.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
OBJECT_SIZE, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description PrimitiveEntrySizeCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calculateSize(java.lang.Object key, java.lang.Object value)
Method used to calculate how much memory in size the key and value use.protected long
handleObject(java.lang.Object object)
-
Methods inherited from class org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper
roundUpToNearest8
-
-
-
-
Method Detail
-
calculateSize
public long calculateSize(java.lang.Object key, java.lang.Object value)
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
protected long handleObject(java.lang.Object object)
-
-