Class HistoryLimit

java.lang.Object
org.jolokia.service.history.HistoryLimit
All Implemented Interfaces:
Serializable

public class HistoryLimit extends Object implements Serializable
Helper class used for specifying history entry limits
Since:
05.03.12
Author:
roland
See Also:
  • Constructor Details

    • HistoryLimit

      public HistoryLimit(int pMaxEntries, long pMaxDuration)
      Create a limit with either or both maxEntries and maxDuration set
      Parameters:
      pMaxEntries - maximum number of entries to keep
      pMaxDuration - maximum duration for entries to keep (in seconds)
  • Method Details

    • getMaxEntries

      public int getMaxEntries()
    • getMaxDuration

      public long getMaxDuration()
    • respectGlobalMaxEntries

      public HistoryLimit respectGlobalMaxEntries(int pGlobalMaxEntries)
      Return a limit whose max entries are smaller or equals the given upper limit. For effieciency reasons, this object's state might change with this method (i.e. the maxEntry number might be set or decreased)
      Parameters:
      pGlobalMaxEntries - upper limit
      Returns:
      this if this limit already is below the upper limit or a new limit which lies in this limit
    • toString

      public String toString()
      Overrides:
      toString in class Object