Package org.infinispan.commons.util
Class AbstractEntrySizeCalculatorHelper<K,V>
java.lang.Object
org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<K,V>
- All Implemented Interfaces:
EntrySizeCalculator<K,
V>
- Direct Known Subclasses:
CacheEntrySizeCalculator
,PrimitiveEntrySizeCalculator
,WrappedByteArraySizeCalculator
public abstract class AbstractEntrySizeCalculatorHelper<K,V>
extends Object
implements EntrySizeCalculator<K,V>
Abstract class that provides a method to round up to the nearest value of 8 which is important for most jvm when
doing size calculations. This is due to the fact that most JVMs align to the nearest 8 bytes for addressing
purposes.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commons.util.EntrySizeCalculator
calculateSize
-
Field Details
-
OBJECT_SIZE
public static final int OBJECT_SIZE -
POINTER_SIZE
public static final int POINTER_SIZE -
HEADER_AND_CLASS_REFERENCE
public static final int HEADER_AND_CLASS_REFERENCE
-
-
Constructor Details
-
AbstractEntrySizeCalculatorHelper
public AbstractEntrySizeCalculatorHelper()
-
-
Method Details
-
roundUpToNearest8
public static long roundUpToNearest8(long size)
-