Class PrimitiveEntrySizeCalculator

java.lang.Object
org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<Object,Object>
org.infinispan.container.entries.PrimitiveEntrySizeCalculator
All Implemented Interfaces:
EntrySizeCalculator<Object,Object>

public class PrimitiveEntrySizeCalculator extends AbstractEntrySizeCalculatorHelper<Object,Object>
Entry Size calculator that returns an approximation of how much various primitives, primitive wrappers, Strings, and arrays
Since:
8.0
Author:
wburns
  • Constructor Details

    • PrimitiveEntrySizeCalculator

      public PrimitiveEntrySizeCalculator()
  • Method Details

    • calculateSize

      public long calculateSize(Object key, 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 calculation
      value - 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(Object object)