Class InactivityTimeout
java.lang.Object
com.swiftmq.impl.streams.comp.memory.InactivityTimeout
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 Summary
Modifier and TypeMethodDescriptiondays
(int n) Adds n days to the timeout.hours
(int n) Adds n hours to the timeout.limit()
Returns a LimitBuilder to add Limits to the Memorymilliseconds
(long n) Adds n milliseconds to the timeout.minutes
(int n) Adds n minutes to the timeout.onRetire
(RetirementCallback callback) Sets the RetirementCallback at the Memoryseconds
(int n) Adds n seconds to the timeout.toString()
-
Method Details
-
days
Adds n days to the timeout.- Parameters:
n
- days- Returns:
- this
-
hours
Adds n hours to the timeout.- Parameters:
n
- hours- Returns:
- this
-
minutes
Adds n minutes to the timeout.- Parameters:
n
- minutes- Returns:
- this
-
seconds
Adds n seconds to the timeout.- Parameters:
n
- seconds- Returns:
- this
-
milliseconds
Adds n milliseconds to the timeout.- Parameters:
n
- milliseconds- Returns:
- this
-
onRetire
Sets the RetirementCallback at the Memory- Parameters:
callback
- RetirementCallback- Returns:
- this
-
limit
Returns a LimitBuilder to add Limits to the Memory- Returns:
- LimitBuilder
-
toString
-