Class InMemoryPubSubPosition

java.lang.Object
com.linkedin.venice.unit.kafka.InMemoryPubSubPosition
All Implemented Interfaces:
Measurable, PubSubPosition

public class InMemoryPubSubPosition extends Object implements PubSubPosition
  • Constructor Details

    • InMemoryPubSubPosition

      public InMemoryPubSubPosition(long offset)
  • Method Details

    • comparePosition

      public int comparePosition(PubSubPosition other)
      Specified by:
      comparePosition in interface PubSubPosition
      Parameters:
      other - the other position to compare to
      Returns:
      returns 0 if the positions are equal, -1 if this position is less than the other position, and 1 if this position is greater than the other position
    • diff

      public long diff(PubSubPosition other)
      Specified by:
      diff in interface PubSubPosition
      Returns:
      the difference between this position and the other position
    • getNumericOffset

      public long getNumericOffset()
      Specified by:
      getNumericOffset in interface PubSubPosition
    • getPositionWireFormat

      public PubSubPositionWireFormat getPositionWireFormat()
      Description copied from interface: PubSubPosition
      Position wrapper is used to wrap the position type and the position value. This is used to serialize and deserialize the position object when sending and receiving it over the wire.
      Specified by:
      getPositionWireFormat in interface PubSubPosition
      Returns:
      the position wrapper
    • getHeapSize

      public int getHeapSize()
      Specified by:
      getHeapSize in interface Measurable