Class DistributableTimer<I>
java.lang.Object
org.jboss.as.ejb3.timerservice.AbstractManagedTimer
org.jboss.as.ejb3.timerservice.distributable.DistributableTimer<I>
- Type Parameters:
I- the timer identifier type
- All Implemented Interfaces:
jakarta.ejb.Timer,ManagedTimer
Managed timer facade for a distributable EJB timer.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDistributableTimer(org.wildfly.clustering.ejb.timer.TimerManager<I> manager, org.wildfly.clustering.ejb.timer.Timer<I> timer, org.wildfly.clustering.cache.batch.SuspendedBatch suspendedBatch, TimedObjectInvoker invoker, TimerSynchronizationFactory<I> synchronizationFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates a previously suspended timer.voidcancel()jakarta.ejb.TimerHandlegetId()The unique identifier of this timer.getInfo()jakarta.ejb.ScheduleExpressionlongvoidinvoke()Invokes the timeout method associated with this timer.booleanisActive()Indicates whether this timer is active, i.e. not suspended.booleanbooleanIndicates whether this timer was canceled, i.e. viaTimer.cancel().booleanIndicates whether this timer has expired, i.e. it has no more timeouts.booleanvoidsuspend()Suspends a previously active timer.Methods inherited from class org.jboss.as.ejb3.timerservice.AbstractManagedTimer
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jboss.as.ejb3.timerservice.spi.ManagedTimer
validateInvocationContext
-
Constructor Details
-
DistributableTimer
public DistributableTimer(org.wildfly.clustering.ejb.timer.TimerManager<I> manager, org.wildfly.clustering.ejb.timer.Timer<I> timer, org.wildfly.clustering.cache.batch.SuspendedBatch suspendedBatch, TimedObjectInvoker invoker, TimerSynchronizationFactory<I> synchronizationFactory)
-
-
Method Details
-
getId
Description copied from interface:ManagedTimerThe unique identifier of this timer.- Specified by:
getIdin interfaceManagedTimer- Overrides:
getIdin classAbstractManagedTimer- Returns:
- a unique identifier
-
isActive
public boolean isActive()Description copied from interface:ManagedTimerIndicates whether this timer is active, i.e. not suspended.- Returns:
- true, if this timer is active, false otherwise.
-
isCanceled
public boolean isCanceled()Description copied from interface:ManagedTimerIndicates whether this timer was canceled, i.e. viaTimer.cancel().- Returns:
- true, if this timer was canceled, false otherwise.
-
isExpired
public boolean isExpired()Description copied from interface:ManagedTimerIndicates whether this timer has expired, i.e. it has no more timeouts. An interval timer will always return false.- Returns:
- true, if this timer has expired, false otherwise.
-
activate
public void activate()Description copied from interface:ManagedTimerActivates a previously suspended timer. Once active, the timer will receive timeout events as usual, including any timeouts missed while inactive. -
suspend
public void suspend()Description copied from interface:ManagedTimerSuspends a previously active timer. While suspended, the timer will not receive timeout events. -
invoke
Description copied from interface:ManagedTimerInvokes the timeout method associated with this timer. Has no impact on this timer's schedule.- Throws:
Exception
-
cancel
public void cancel() -
getTimeRemaining
public long getTimeRemaining() -
getNextTimeout
-
getInfo
-
getHandle
public jakarta.ejb.TimerHandle getHandle() -
getSchedule
public jakarta.ejb.ScheduleExpression getSchedule() -
isCalendarTimer
public boolean isCalendarTimer() -
isPersistent
public boolean isPersistent()
-