Package com.tangosol.net.topic
Interface NamedTopic.ElementCalculator
- 
- All Known Implementing Classes:
 BinaryElementCalculator,FixedElementCalculator
- Enclosing interface:
 - NamedTopic<V>
 
public static interface NamedTopic.ElementCalculatorA unit calculator is an object that can calculate the cost of storing an element in a topic. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intcalculateUnits(Binary binElement)Calculate cost for the specified element.default StringgetName()Obtain the name of the unit calculator. 
 - 
 
- 
- 
Method Detail
- 
calculateUnits
int calculateUnits(Binary binElement)
Calculate cost for the specified element.- Parameters:
 binElement- the element value (in serialized Binary form) to evaluate for unit cost- Returns:
 - an integer value 0 or greater, with a larger value signifying a higher cost
 - Throws:
 IllegalArgumentException- if the specified object type cannot be processed by this calculator
 
- 
getName
default String getName()
Obtain the name of the unit calculator. This is intended to be human-readable for use in a monitoring tool; examples include "SimpleMemoryCalculator" and "BinaryMemoryCalculator".- Returns:
 - the name of the unit calculator
 
 
 - 
 
 -