Generational Queue keep track of elements based on their last activity.
You can refresh activity of an element by calling touch(a: A) on it.
There is 2 ways of retrieving old elements:
- collect(age: Duration) collect the oldest element (age of elem must be > age)
- collectAll(age: Duration) collect all the elements which age > age in parameter
Generational Queue keep track of elements based on their last activity. You can refresh activity of an element by calling touch(a: A) on it. There is 2 ways of retrieving old elements: - collect(age: Duration) collect the oldest element (age of elem must be > age) - collectAll(age: Duration) collect all the elements which age > age in parameter