Interface ManagedTimerService
- All Superinterfaces:
org.wildfly.clustering.server.manager.Service,jakarta.ejb.TimerService
- All Known Implementing Classes:
CompositeTimerService,DistributableTimerService,NonFunctionalTimerService,TimerServiceImpl
public interface ManagedTimerService
extends jakarta.ejb.TimerService, org.wildfly.clustering.server.manager.Service
Interface for managed
TimerService implementations.- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault jakarta.ejb.TimercreateCalendarTimer(jakarta.ejb.ScheduleExpression schedule) default jakarta.ejb.TimercreateIntervalTimer(long initialDuration, long intervalDuration, jakarta.ejb.TimerConfig config) default jakarta.ejb.TimercreateSingleActionTimer(long duration, jakarta.ejb.TimerConfig config) default jakarta.ejb.TimercreateTimer(long initialDuration, long intervalDuration, Serializable info) default jakarta.ejb.TimercreateTimer(long duration, Serializable info) default jakarta.ejb.TimercreateTimer(Date initialExpiration, long intervalDuration, Serializable info) default jakarta.ejb.TimercreateTimer(Date expiration, Serializable info) Returns the managed timer associated with the specified identifierstatic jakarta.transaction.TransactionReturns the invoker for the timed object associated with this timer service.static booleanReturns true if theCurrentInvocationContextrepresents a lifecycle callback invocation.default voidValidates the invocation context of a given specification method.Methods inherited from interface org.wildfly.clustering.server.manager.Service
start, stopMethods inherited from interface jakarta.ejb.TimerService
createCalendarTimer, createIntervalTimer, createSingleActionTimer, getAllTimers, getTimers
-
Method Details
-
findTimer
Returns the managed timer associated with the specified identifier- Parameters:
id- a timer identifier- Returns:
- a managed timer
-
getInvoker
TimedObjectInvoker getInvoker()Returns the invoker for the timed object associated with this timer service.- Returns:
- a timed object invoker
-
createCalendarTimer
default jakarta.ejb.Timer createCalendarTimer(jakarta.ejb.ScheduleExpression schedule) - Specified by:
createCalendarTimerin interfacejakarta.ejb.TimerService
-
createIntervalTimer
default jakarta.ejb.Timer createIntervalTimer(long initialDuration, long intervalDuration, jakarta.ejb.TimerConfig config) - Specified by:
createIntervalTimerin interfacejakarta.ejb.TimerService
-
createSingleActionTimer
default jakarta.ejb.Timer createSingleActionTimer(long duration, jakarta.ejb.TimerConfig config) - Specified by:
createSingleActionTimerin interfacejakarta.ejb.TimerService
-
createTimer
default jakarta.ejb.Timer createTimer(long duration, Serializable info) throws jakarta.ejb.EJBException - Specified by:
createTimerin interfacejakarta.ejb.TimerService- Throws:
jakarta.ejb.EJBException
-
createTimer
default jakarta.ejb.Timer createTimer(long initialDuration, long intervalDuration, Serializable info) - Specified by:
createTimerin interfacejakarta.ejb.TimerService
-
createTimer
- Specified by:
createTimerin interfacejakarta.ejb.TimerService
-
createTimer
default jakarta.ejb.Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) - Specified by:
createTimerin interfacejakarta.ejb.TimerService
-
validateInvocationContext
default void validateInvocationContext()Validates the invocation context of a given specification method. -
getActiveTransaction
static jakarta.transaction.Transaction getActiveTransaction()- Returns:
- true if the transaction is in a state where synchronizations can be registered
-
isLifecycleCallbackInvocation
static boolean isLifecycleCallbackInvocation()Returns true if theCurrentInvocationContextrepresents a lifecycle callback invocation. Else returns false.This method internally relies on
CurrentInvocationContext.get()to obtain the current invocation context.- If the context is available then it looks for the method that was invoked. The absence of a method indicates a lifecycle callback.
- If the context is not available, then this method returns false (i.e.
it doesn't consider the current invocation as a lifecycle callback). This is
for convenience, to allow the invocation of
TimerServicemethods in the absence ofCurrentInvocationContext
- Returns:
-