Class AbstractTimerMetaDataEntry<C>
- java.lang.Object
-
- org.wildfly.clustering.ejb.cache.timer.AbstractTimerMetaDataEntry<C>
-
- All Implemented Interfaces:
Function<Instant,Instant>,UnaryOperator<Instant>,Remappable<RemappableTimerMetaDataEntry<C>,Supplier<Offset<Duration>>>,ImmutableTimerMetaDataEntry<C>,RemappableTimerMetaDataEntry<C>,TimerMetaDataEntry<C>,TimerConfiguration
- Direct Known Subclasses:
IntervalTimerMetaDataEntry,ScheduleTimerMetaDataEntry
public abstract class AbstractTimerMetaDataEntry<C> extends Object implements RemappableTimerMetaDataEntry<C>
The base timer metadata cache entry.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTimerMetaDataEntry(C context, Instant start)protectedAbstractTimerMetaDataEntry(C context, TimerConfiguration config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract RemappableTimerMetaDataEntry<C>clone()CgetContext()Returns the context with which this timer was created.DurationgetLastTimeout()Supplies the time of the most recent timeout event of this timer, or null if there are no previous timeout eventsInstantgetStart()RemappableTimerMetaDataEntry<C>remap(Supplier<Offset<Duration>> lastTimeoutOffset)voidsetLastTimeout(Duration timeout)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.clustering.ejb.cache.timer.ImmutableTimerMetaDataEntry
getTimeoutMatcher, getType
-
-
-
-
Constructor Detail
-
AbstractTimerMetaDataEntry
protected AbstractTimerMetaDataEntry(C context, TimerConfiguration config)
-
-
Method Detail
-
getContext
public C getContext()
Description copied from interface:ImmutableTimerMetaDataEntryReturns the context with which this timer was created.- Specified by:
getContextin interfaceImmutableTimerMetaDataEntry<C>- Returns:
- the timer context
-
getStart
public Instant getStart()
- Specified by:
getStartin interfaceTimerConfiguration
-
getLastTimeout
public Duration getLastTimeout()
Description copied from interface:ImmutableTimerMetaDataEntrySupplies the time of the most recent timeout event of this timer, or null if there are no previous timeout events- Specified by:
getLastTimeoutin interfaceImmutableTimerMetaDataEntry<C>- Returns:
- a reference to the time of the last timeout event, if one exists
-
setLastTimeout
public void setLastTimeout(Duration timeout)
- Specified by:
setLastTimeoutin interfaceTimerMetaDataEntry<C>
-
remap
public RemappableTimerMetaDataEntry<C> remap(Supplier<Offset<Duration>> lastTimeoutOffset)
- Specified by:
remapin interfaceRemappable<RemappableTimerMetaDataEntry<C>,Supplier<Offset<Duration>>>
-
clone
protected abstract RemappableTimerMetaDataEntry<C> clone()
-
-