Package org.infinispan.commons.util
Interface EntrySizeCalculator<K,V>
- Type Parameters:
K
- The key type for this entry size calculatorV
- The value type for this entry size calculator
- All Known Implementing Classes:
AbstractEntrySizeCalculatorHelper
,CacheEntrySizeCalculator
,PrimitiveEntrySizeCalculator
,WrappedByteArraySizeCalculator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionlong
calculateSize
(K key, V value) Method used to calculate how much memory in size the key and value use.
-
Method Details
-
calculateSize
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
-