public class NonPersistentEJBTimerService extends EJBTimerService
EJBTimerService.TimerCachedomainName_, ejbContainerUtil, isDas, ownerIdOfThisServer_, STATE_ACTIVE, STATE_CANCELLED, timerCache_, totalTimedObjectsInitialized_| Modifier | Constructor and Description |
|---|---|
protected |
NonPersistentEJBTimerService() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
cancelNonPersistentTimer(TimerPrimaryKey timerId) |
protected void |
cancelTimer(TimerPrimaryKey timerId) |
protected void |
cancelTimersByKey(long containerId,
Object primaryKey)
Cancel all timers associated with a particular entity bean identity.This
is typically called when an entity bean is removed.Note that this action
falls under the normal EJB Timer removal semantics, which means it can be
rolled back if the transaction rolls back.
|
protected Serializable |
getInfo(TimerPrimaryKey timerId) |
protected Date |
getNextTimeout(TimerPrimaryKey timerId)
Return next planned timeout for this timer.We have a fair amount of
leeway regarding the consistency of this information.We should strive to
detect the case where the timer no longer exists.However, since the
current timer instance may not even own this timer, it's difficult to
know the exact time of delivery in another server instance.
|
Set<TimerPrimaryKey> |
getNonPersistentActiveTimerIdsByThisServer() |
protected RuntimeTimerState |
getNonPersistentTimer(TimerPrimaryKey timerId) |
protected Collection<TimerPrimaryKey> |
getTimerIds(Collection<Long> containerIds) |
protected Collection<TimerPrimaryKey> |
getTimerIds(long containerId,
Object timedObjectPrimaryKey)
Called by EJBTimerServiceWrapper when caller calls getTimers.
|
protected EJBTimerSchedule |
getTimerSchedule(TimerPrimaryKey timerId)
Called by #getScheduleExpression and #isCalendarTimer
|
protected boolean |
isNonpersistent(TimerPrimaryKey timerId)
Check if timerId represents nonpersistent timer.
|
boolean |
isPersistent() |
protected boolean |
isPersistent(TimerPrimaryKey timerId) |
protected boolean |
isValidTimerForThisServer(TimerPrimaryKey timerId,
RuntimeTimerState timerState)
Non-persistent timers are always valid because to be executed on this
server instance.
|
int |
migrateTimers(String fromOwnerId)
Called by CLI.Take ownership of another server's timers.
|
protected void |
resetEJBTimers(String target)
Called at server startup *after* user apps have been re-activated to
restart any active EJB timers or cleanup old timers.No-op for
non-persistent timers
|
protected void |
resetLastExpiration(TimerPrimaryKey timerId,
RuntimeTimerState timerState)
Nothing special to do for non-persistent timers
|
protected void |
stopTimers(long containerId)
Remove from the cache and stop all timers associated with a particular
ejb container and known to this server instance.This is typically called
when an ejb is disabled or on a server shutdown to avoid accidentally
removing a valid timer.
|
protected boolean |
timerExists(TimerPrimaryKey timerId) |
_createTimer, _destroyTimers, _getNextTimeout, addTimerSynchronization, addTimerSynchronization, addToSchedules, calcNextFixedRateExpiration, calcNextFixedRateExpiration, cancelTimerSynchronization, cancelTimerSynchronization, createEJBException, createSchedules, createSchedules, createSchedulesOnServer, destroyAllTimers, destroyTimers, expungeTimer, getContainer, getEJBTimerService, getEJBTimerService, getEJBTimerService, getEJBTimerService, getEJBTimerServiceWrapper, getMaxRedeliveries, getNextScheduledTimeout, getNonPersistentTimerService, getOwnerIdOfThisServer, getPersistentTimerService, getTimerClassLoader, getTimerState, isCancelledByAnotherInstance, isNonPersistentTimerServiceLoaded, isPersistentTimerServiceLoaded, listTimers, onShutdown, recoverAndCreateSchedules, redeliverTimeout, scheduleTask, setNonPersistentTimerService, setPersistentTimerService, stopOnFailure, stopTimers, timerStateToStringpublic boolean isPersistent()
isPersistent in class EJBTimerServiceprotected boolean isNonpersistent(TimerPrimaryKey timerId) throws javax.ejb.FinderException
timerId - id of the timerjavax.ejb.FinderException - if timerId represents expired nonpersistent timerpublic int migrateTimers(String fromOwnerId)
EJBTimerServicemigrateTimers in class EJBTimerServiceprotected void cancelTimer(TimerPrimaryKey timerId) throws javax.ejb.FinderException, Exception
cancelTimer in class EJBTimerServicejavax.ejb.FinderExceptionExceptionprotected void cancelTimersByKey(long containerId,
Object primaryKey)
EJBTimerServicecancelTimersByKey in class EJBTimerServiceprotected Date getNextTimeout(TimerPrimaryKey timerId) throws javax.ejb.FinderException
EJBTimerServicegetNextTimeout in class EJBTimerServicejavax.ejb.FinderExceptionprotected boolean isValidTimerForThisServer(TimerPrimaryKey timerId, RuntimeTimerState timerState)
EJBTimerServiceisValidTimerForThisServer in class EJBTimerServiceprotected boolean cancelNonPersistentTimer(TimerPrimaryKey timerId) throws javax.ejb.FinderException, Exception
javax.ejb.FinderExceptionExceptionpublic Set<TimerPrimaryKey> getNonPersistentActiveTimerIdsByThisServer()
getNonPersistentActiveTimerIdsByThisServer in class EJBTimerServiceprotected RuntimeTimerState getNonPersistentTimer(TimerPrimaryKey timerId) throws javax.ejb.FinderException
javax.ejb.FinderExceptionprotected EJBTimerSchedule getTimerSchedule(TimerPrimaryKey timerId) throws javax.ejb.FinderException
EJBTimerServicegetTimerSchedule in class EJBTimerServicejavax.ejb.FinderExceptionprotected boolean isPersistent(TimerPrimaryKey timerId) throws javax.ejb.FinderException
isPersistent in class EJBTimerServicejavax.ejb.FinderExceptionprotected boolean timerExists(TimerPrimaryKey timerId)
timerExists in class EJBTimerServiceprotected Serializable getInfo(TimerPrimaryKey timerId) throws javax.ejb.FinderException
getInfo in class EJBTimerServicejavax.ejb.FinderExceptionprotected Collection<TimerPrimaryKey> getTimerIds(Collection<Long> containerIds)
getTimerIds in class EJBTimerServicecontainerIds - the EJBs which own the timersprotected Collection<TimerPrimaryKey> getTimerIds(long containerId, Object timedObjectPrimaryKey)
EJBTimerServicegetTimerIds in class EJBTimerServicecontainerId - the id of the EJB which owns the timerstimedObjectPrimaryKey - can be null if not entity beanprotected void stopTimers(long containerId)
EJBTimerServicestopTimers in class EJBTimerServiceprotected void resetEJBTimers(String target)
EJBTimerServiceresetEJBTimers in class EJBTimerServiceprotected void resetLastExpiration(TimerPrimaryKey timerId, RuntimeTimerState timerState)
EJBTimerServiceresetLastExpiration in class EJBTimerServiceCopyright © 2019. All rights reserved.