TimeLimitedQueue¶
-
public class
TimeLimitedQueue
extends LimitedQueue<Event>¶ A time and space limited queue of RSB
Event
s that discards past events older than a specified time limit. It will additionally discard old events when reaching a set maximum capacity.- Author
dklotz
Constructors¶
TimeLimitedQueue¶
-
public
TimeLimitedQueue
(int capacity, long timeWindow, TimeUnit unit)¶ Creates a new queue with the specified maximum capacity and time window for keeping events in the queue.
- Parameters
capacity – maximum capacity before discarding events
timeWindow – time to keep events in the specified unit
unit – unit for the time window