Class LogLag

java.lang.Object
org.nuxeo.lib.stream.log.LogLag

public class LogLag extends Object
Represent the number of messages between 2 offsets
Since:
9.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final long
     
    protected final long
     
    protected final long
     
    protected final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LogLag(long lowerOffset, long upperOffset)
     
    LogLag(long lowerOffset, long upperOffset, long lag, long upper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    long
    lag()
    Returns the number of messages between lower and upper offsets.
    long
    Convert the lowerOffset into a number of messages.
    long
     
    static LogLag
    of(long lag)
     
    static LogLag
    of(long lowerOffset, long upperOffset)
     
    static LogLag
    of(List<LogLag> lags)
     
     
    long
    Convert the upperOffset into a number of messages.
    long
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • lowerOffset

      protected final long lowerOffset
    • upperOffset

      protected final long upperOffset
    • lag

      protected final long lag
    • upper

      protected final long upper
  • Constructor Details

    • LogLag

      public LogLag(long lowerOffset, long upperOffset)
    • LogLag

      public LogLag(long lowerOffset, long upperOffset, long lag, long upper)
  • Method Details

    • of

      public static LogLag of(long lowerOffset, long upperOffset)
    • of

      public static LogLag of(long lag)
    • of

      public static LogLag of(List<LogLag> lags)
    • lag

      public long lag()
      Returns the number of messages between lower and upper offsets.
    • upper

      public long upper()
      Convert the upperOffset into a number of messages.
    • lower

      public long lower()
      Convert the lowerOffset into a number of messages.
    • upperOffset

      public long upperOffset()
    • lowerOffset

      public long lowerOffset()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object