- Type Parameters:
- All Implemented Interfaces:
@Deprecated(since="2021-05-27") public abstract class CyclicTimeouts<T extends CyclicTimeouts.Expirable> extends Object implements DestroyableDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
An implementation of a timeout that manages many
expirableentities whose timeouts are mostly cancelled or re-scheduled.
A typical scenario is for a parent entity to manage the timeouts of many children entities.
When a new entity is created, call
schedule(Expirable)with the new entity so that this instance can be aware and manage the timeout of the new entity.
Eventually, this instance wakes up and iterates over the entities provided by
iterator(). During the iteration, each entity:
- may never expire (see
CyclicTimeouts.Expirable.getExpireNanoTime(); the entity is ignored
- may be expired;
onExpired(Expirable)is called with that entity as parameter
- may expire at a future time; the iteration records the earliest expiration time among all non-expired entities
When the iteration is complete, this instance is re-scheduled with the earliest expiration time calculated during the iteration.
- See Also:
Nested Class Summary
Nested Classes Modifier and Type Class Description
CyclicTimeouts.ExpirableDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description
schedule(T expirable)Deprecated.Manages the timeout of a new entity.
public CyclicTimeouts(Scheduler scheduler)Deprecated.