Class DistributableTimer<I>
java.lang.Object
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(TimerManager<I, Batch> manager, Timer<I> timer, Batch suspendedBatch, TimedObjectInvoker invoker, TimerSynchronizationFactory<I> synchronizationFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates a previously suspended timer.voidcancel()booleanjakarta.ejb.TimerHandlegetId()The unique identifier of this timer.getInfo()jakarta.ejb.ScheduleExpressionlonginthashCode()voidinvoke()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.toString()Methods 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(TimerManager<I, Batch> manager, Timer<I> timer, Batch suspendedBatch, TimedObjectInvoker invoker, TimerSynchronizationFactory<I> synchronizationFactory)
-
-
Method Details
-
getId
Description copied from interface:ManagedTimerThe unique identifier of this timer.- Specified by:
getIdin interfaceManagedTimer- Returns:
- a unique identifier
-
isActive
public boolean isActive()Description copied from interface:ManagedTimerIndicates whether this timer is active, i.e. not suspended.- Specified by:
isActivein interfaceManagedTimer- 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().- Specified by:
isCanceledin interfaceManagedTimer- 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.- Specified by:
isExpiredin interfaceManagedTimer- 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.- Specified by:
activatein interfaceManagedTimer
-
suspend
public void suspend()Description copied from interface:ManagedTimerSuspends a previously active timer. While suspended, the timer will not receive timeout events.- Specified by:
suspendin interfaceManagedTimer
-
invoke
Description copied from interface:ManagedTimerInvokes the timeout method associated with this timer. Has no impact on this timer's schedule.- Specified by:
invokein interfaceManagedTimer- Throws:
Exception
-
cancel
public void cancel()- Specified by:
cancelin interfacejakarta.ejb.Timer
-
getTimeRemaining
public long getTimeRemaining()- Specified by:
getTimeRemainingin interfacejakarta.ejb.Timer
-
getNextTimeout
- Specified by:
getNextTimeoutin interfacejakarta.ejb.Timer
-
getInfo
- Specified by:
getInfoin interfacejakarta.ejb.Timer
-
getHandle
public jakarta.ejb.TimerHandle getHandle()- Specified by:
getHandlein interfacejakarta.ejb.Timer
-
getSchedule
public jakarta.ejb.ScheduleExpression getSchedule()- Specified by:
getSchedulein interfacejakarta.ejb.Timer
-
isCalendarTimer
public boolean isCalendarTimer()- Specified by:
isCalendarTimerin interfacejakarta.ejb.Timer
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfacejakarta.ejb.Timer
-
hashCode
public int hashCode() -
equals
-
toString
-