Class GroupInactivityTimeout

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

public class GroupInactivityTimeout extends Object
A GroupInactivityTimeout can be attached to a MemoryGroup and specifies a time of inactivity (no adds to attached Memory) after which all Messages in that Memory will retire and the Memory will be closed and removed from the MemoryGroup. Inactivity is checked during MemoryGroup.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 GroupInactivityTimeout days(int n)
      Adds n days to the timeout.
      Parameters:
      n - days
      Returns:
      this
    • hours

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

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

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

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

      public MemoryGroup onCreate(MemoryCreateCallback callback)
      Registers a MemoryCreateCallback at the MemoryGroup
      Parameters:
      callback - MemoryCreateCallback
      Returns:
      MemoryGroup
    • onRemove

      public MemoryGroup onRemove(MemoryRemoveCallback callback)
      Registers a MemoryRemoveCallback at the MemoryGroup
      Parameters:
      callback - MemoryRemoveCallback
      Returns:
      MemoryGroup
    • toString

      public String toString()
      Overrides:
      toString in class Object