Class MutableTimerMetaDataEntry<C>
- java.lang.Object
-
- org.wildfly.clustering.ejb.cache.timer.MutableTimerMetaDataEntry<C>
-
- All Implemented Interfaces:
Function<Instant,Instant>,UnaryOperator<Instant>,ImmutableTimerMetaDataEntry<C>,TimerMetaDataEntry<C>,TimerConfiguration
public class MutableTimerMetaDataEntry<C> extends Object implements TimerMetaDataEntry<C>
- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description MutableTimerMetaDataEntry(ImmutableTimerMetaDataEntry<C> entry, OffsetValue<Duration> lastTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instantapply(Instant instant)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()Predicate<Method>getTimeoutMatcher()Returns the timeout matcher, used to locate the timeout method within the associated component.TimerTypegetType()Returns the type of this timervoidsetLastTimeout(Duration timeout)
-
-
-
Constructor Detail
-
MutableTimerMetaDataEntry
public MutableTimerMetaDataEntry(ImmutableTimerMetaDataEntry<C> entry, OffsetValue<Duration> lastTimeout)
-
-
Method Detail
-
getType
public TimerType getType()
Description copied from interface:ImmutableTimerMetaDataEntryReturns the type of this timer- Specified by:
getTypein interfaceImmutableTimerMetaDataEntry<C>- Returns:
- the timer type
-
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
-
getTimeoutMatcher
public Predicate<Method> getTimeoutMatcher()
Description copied from interface:ImmutableTimerMetaDataEntryReturns the timeout matcher, used to locate the timeout method within the associated component.- Specified by:
getTimeoutMatcherin interfaceImmutableTimerMetaDataEntry<C>- Returns:
- an timeout matcher
-
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>
-
-