Class InactivityTimeout

java.lang.Object
com.swiftmq.impl.streams.comp.memory.InactivityTimeout

public class InactivityTimeout extends Object
InactivityTimeout can be attached to a Memory and specifies a time of inactivity (no adds to Memory) after which all Messages in that Memory will retire. Inactivity is checked during Memory.checkLimit() and thus needs to be regularly called from a Timer.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2017, All Rights Reserved
  • Method Details

    • days

      public InactivityTimeout days(int n)
      Adds n days to the timeout.
      Parameters:
      n - days
      Returns:
      this
    • hours

      public InactivityTimeout hours(int n)
      Adds n hours to the timeout.
      Parameters:
      n - hours
      Returns:
      this
    • minutes

      public InactivityTimeout minutes(int n)
      Adds n minutes to the timeout.
      Parameters:
      n - minutes
      Returns:
      this
    • seconds

      public InactivityTimeout seconds(int n)
      Adds n seconds to the timeout.
      Parameters:
      n - seconds
      Returns:
      this
    • milliseconds

      public InactivityTimeout milliseconds(long n)
      Adds n milliseconds to the timeout.
      Parameters:
      n - milliseconds
      Returns:
      this
    • onRetire

      public InactivityTimeout onRetire(RetirementCallback callback)
      Sets the RetirementCallback at the Memory
      Parameters:
      callback - RetirementCallback
      Returns:
      this
    • limit

      public LimitBuilder limit()
      Returns a LimitBuilder to add Limits to the Memory
      Returns:
      LimitBuilder
    • toString

      public String toString()
      Overrides:
      toString in class Object