Class GroupInactivityTimeout
java.lang.Object
com.swiftmq.impl.streams.comp.memory.GroupInactivityTimeout
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 Summary
Modifier and TypeMethodDescriptiondays
(int n) Adds n days to the timeout.hours
(int n) Adds n hours to the timeout.milliseconds
(long n) Adds n milliseconds to the timeout.minutes
(int n) Adds n minutes to the timeout.onCreate
(MemoryCreateCallback callback) Registers a MemoryCreateCallback at the MemoryGrouponRemove
(MemoryRemoveCallback callback) Registers a MemoryRemoveCallback at the MemoryGroupseconds
(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
-
onCreate
Registers a MemoryCreateCallback at the MemoryGroup- Parameters:
callback
- MemoryCreateCallback- Returns:
- MemoryGroup
-
onRemove
Registers a MemoryRemoveCallback at the MemoryGroup- Parameters:
callback
- MemoryRemoveCallback- Returns:
- MemoryGroup
-
toString
-