Class WrappedByteArraySizeCalculator<K,​V>

  • All Implemented Interfaces:
    org.infinispan.commons.util.EntrySizeCalculator<K,​V>

    public class WrappedByteArraySizeCalculator<K,​V>
    extends org.infinispan.commons.util.AbstractEntrySizeCalculatorHelper<K,​V>
    Size calculator that supports a WrappedByteArray by adding its size and the underlying byte[].
    Since:
    9.0
    Author:
    wburns
    • Constructor Detail

      • WrappedByteArraySizeCalculator

        public WrappedByteArraySizeCalculator​(org.infinispan.commons.util.EntrySizeCalculator<?,​?> chained)
    • Method Detail

      • calculateSize

        public long calculateSize​(K key,
                                  V value)
        Description copied from interface: org.infinispan.commons.util.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