Class BinaryElementCalculator

java.lang.Object
com.tangosol.net.topic.BinaryElementCalculator
All Implemented Interfaces:
NamedTopic.ElementCalculator

public class BinaryElementCalculator extends Object implements NamedTopic.ElementCalculator
A NamedTopic.ElementCalculator that calculates size of an element based on the size of the serialized binary value.
Since:
21.06
Author:
Jonathan Knight 2021.05.17
  • Field Details

  • Constructor Details

    • BinaryElementCalculator

      public BinaryElementCalculator()
  • Method Details

    • calculateUnits

      public int calculateUnits(Binary binElement)
      Description copied from interface: NamedTopic.ElementCalculator
      Calculate cost for the specified element.
      Specified by:
      calculateUnits in interface NamedTopic.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