Package com.tangosol.net.topic
Class FixedElementCalculator
java.lang.Object
com.tangosol.net.topic.FixedElementCalculator
- All Implemented Interfaces:
NamedTopic.ElementCalculator
A fixed implementation of a
NamedTopic.ElementCalculator that gives all elements a size of 1.- Since:
- 21.06
- Author:
- Jonathan Knight 2021.05.17
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalculateUnits(Binary binElement) Calculate cost for the specified element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tangosol.net.topic.NamedTopic.ElementCalculator
getName
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
FixedElementCalculator
public FixedElementCalculator()
-
-
Method Details
-
calculateUnits
Description copied from interface:NamedTopic.ElementCalculatorCalculate cost for the specified element.- Specified by:
calculateUnitsin interfaceNamedTopic.ElementCalculator- 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
-