public class PersistentEJBTimerService
extends com.sun.ejb.containers.EJBTimerService
| Modifier and Type | Method and Description |
|---|---|
protected void |
_createTimer(com.sun.ejb.containers.TimerPrimaryKey timerId,
long containerId,
long applicationId,
Object timedObjectPrimaryKey,
String server_name,
Date initialExpiration,
long intervalDuration,
com.sun.ejb.containers.EJBTimerSchedule schedule,
javax.ejb.TimerConfig timerConfig)
Create persistent timer.
|
protected void |
_destroyTimers(long id,
boolean all) |
protected void |
cancelTimer(com.sun.ejb.containers.TimerPrimaryKey timerId) |
protected void |
cancelTimersByKey(long containerId,
Object primaryKey) |
void |
createSchedules(long containerId,
long applicationId,
Map<com.sun.enterprise.deployment.MethodDescriptor,List<org.glassfish.ejb.deployment.descriptor.ScheduledTimerDescriptor>> methodDescriptorSchedules,
String server_name)
Create automatic timers defined by the @Schedule annotation on the EJB bean during
deployment to a cluster or the first create-application-ref call after deployment
to DAS only.
|
void |
createSchedulesOnServer(org.glassfish.ejb.deployment.descriptor.EjbDescriptor ejbDescriptor,
String server_name)
Called in a clustered environment to eagerly create automatic persistent timers
on the specific server instance.
|
protected void |
expungeTimer(com.sun.ejb.containers.TimerPrimaryKey timerId,
boolean removeTimerBean) |
protected Serializable |
getInfo(com.sun.ejb.containers.TimerPrimaryKey timerId) |
protected Date |
getNextTimeout(com.sun.ejb.containers.TimerPrimaryKey timerId) |
protected Collection<com.sun.ejb.containers.TimerPrimaryKey> |
getTimerIds(Collection<Long> containerIds)
Return the Ids of active timers owned by EJBs.
|
protected Collection<com.sun.ejb.containers.TimerPrimaryKey> |
getTimerIds(long containerId,
Object timedObjectPrimaryKey)
Use database query to retrieve persistrent timer ids of all active
timers.
|
protected com.sun.ejb.containers.EJBTimerSchedule |
getTimerSchedule(com.sun.ejb.containers.TimerPrimaryKey timerId) |
protected boolean |
isCancelledByAnotherInstance(com.sun.ejb.containers.RuntimeTimerState timerState)
Check if another server instance cancelled this timer.
|
boolean |
isPersistent() |
protected boolean |
isPersistent(com.sun.ejb.containers.TimerPrimaryKey timerId) |
protected boolean |
isValidTimerForThisServer(com.sun.ejb.containers.TimerPrimaryKey timerId,
com.sun.ejb.containers.RuntimeTimerState timerState)
Persistent timers can be cancelled from another server instance
|
String[] |
listTimers(String[] serverIds)
Provide a count of timers owned by each server
|
int |
migrateTimers(String fromOwnerId)
Take ownership of another server's timers.
|
protected Map<com.sun.ejb.containers.TimerPrimaryKey,Method> |
recoverAndCreateSchedules(long containerId,
long applicationId,
Map<Method,List<org.glassfish.ejb.deployment.descriptor.ScheduledTimerDescriptor>> schedules,
boolean deploy)
Recover pre-existing timers associated with the Container identified
by the containerId, and create automatic timers defined by the @Schedule
annotation on the EJB bean.
|
protected boolean |
redeliverTimeout(com.sun.ejb.containers.RuntimeTimerState timerState) |
protected void |
resetEJBTimers(String target) |
protected void |
resetLastExpiration(com.sun.ejb.containers.TimerPrimaryKey timerId,
com.sun.ejb.containers.RuntimeTimerState timerState)
Update database for a persistent timer
|
protected boolean |
stopOnFailure() |
protected void |
stopTimers(long containerId) |
protected boolean |
timerExists(com.sun.ejb.containers.TimerPrimaryKey timerId) |
_getNextTimeout, addTimerSynchronization, addTimerSynchronization, addToSchedules, calcNextFixedRateExpiration, calcNextFixedRateExpiration, cancelNonPersistentTimer, cancelTimerSynchronization, createEJBException, createSchedules, destroyAllTimers, destroyTimers, getContainer, getEJBTimerService, getEJBTimerService, getEJBTimerService, getMaxRedeliveries, getNextScheduledTimeout, getNonPersistentActiveTimerIdsByThisServer, getNonPersistentTimer, getOwnerIdOfThisServer, getTimerClassLoader, getTimerState, getValidEJBTimerService, isEJBTimerServiceLoaded, onShutdown, scheduleTask, setEJBTimerService, stopTimers, timerStateToStringpublic String[] listTimers(String[] serverIds)
listTimers in class com.sun.ejb.containers.EJBTimerServicepublic int migrateTimers(String fromOwnerId)
migrateTimers in class com.sun.ejb.containers.EJBTimerServicepublic boolean isPersistent()
isPersistent in class com.sun.ejb.containers.EJBTimerServiceprotected void cancelTimersByKey(long containerId,
Object primaryKey)
cancelTimersByKey in class com.sun.ejb.containers.EJBTimerServiceprotected void stopTimers(long containerId)
stopTimers in class com.sun.ejb.containers.EJBTimerServiceprotected void _destroyTimers(long id,
boolean all)
_destroyTimers in class com.sun.ejb.containers.EJBTimerServiceprotected void _createTimer(com.sun.ejb.containers.TimerPrimaryKey timerId,
long containerId,
long applicationId,
Object timedObjectPrimaryKey,
String server_name,
Date initialExpiration,
long intervalDuration,
com.sun.ejb.containers.EJBTimerSchedule schedule,
javax.ejb.TimerConfig timerConfig)
throws Exception
_createTimer in class com.sun.ejb.containers.EJBTimerServiceExceptionprotected Map<com.sun.ejb.containers.TimerPrimaryKey,Method> recoverAndCreateSchedules(long containerId, long applicationId, Map<Method,List<org.glassfish.ejb.deployment.descriptor.ScheduledTimerDescriptor>> schedules, boolean deploy)
recoverAndCreateSchedules in class com.sun.ejb.containers.EJBTimerServicepublic void createSchedulesOnServer(org.glassfish.ejb.deployment.descriptor.EjbDescriptor ejbDescriptor,
String server_name)
createSchedulesOnServer in class com.sun.ejb.containers.EJBTimerServicepublic void createSchedules(long containerId,
long applicationId,
Map<com.sun.enterprise.deployment.MethodDescriptor,List<org.glassfish.ejb.deployment.descriptor.ScheduledTimerDescriptor>> methodDescriptorSchedules,
String server_name)
createSchedules in class com.sun.ejb.containers.EJBTimerServiceprotected Collection<com.sun.ejb.containers.TimerPrimaryKey> getTimerIds(long containerId, Object timedObjectPrimaryKey)
getTimerIds in class com.sun.ejb.containers.EJBTimerServicetimedObjectPrimaryKey - can be null if not entity beanprotected Collection<com.sun.ejb.containers.TimerPrimaryKey> getTimerIds(Collection<Long> containerIds)
getTimerIds in class com.sun.ejb.containers.EJBTimerServiceprotected void cancelTimer(com.sun.ejb.containers.TimerPrimaryKey timerId)
throws javax.ejb.FinderException,
Exception
cancelTimer in class com.sun.ejb.containers.EJBTimerServicejavax.ejb.FinderExceptionExceptionprotected Date getNextTimeout(com.sun.ejb.containers.TimerPrimaryKey timerId) throws javax.ejb.FinderException
getNextTimeout in class com.sun.ejb.containers.EJBTimerServicejavax.ejb.FinderExceptionprotected Serializable getInfo(com.sun.ejb.containers.TimerPrimaryKey timerId) throws javax.ejb.FinderException
getInfo in class com.sun.ejb.containers.EJBTimerServicejavax.ejb.FinderExceptionprotected boolean isPersistent(com.sun.ejb.containers.TimerPrimaryKey timerId)
throws javax.ejb.FinderException
isPersistent in class com.sun.ejb.containers.EJBTimerServicejavax.ejb.FinderExceptionprotected boolean timerExists(com.sun.ejb.containers.TimerPrimaryKey timerId)
timerExists in class com.sun.ejb.containers.EJBTimerServiceprotected com.sun.ejb.containers.EJBTimerSchedule getTimerSchedule(com.sun.ejb.containers.TimerPrimaryKey timerId)
throws javax.ejb.FinderException
getTimerSchedule in class com.sun.ejb.containers.EJBTimerServicejavax.ejb.FinderExceptionprotected boolean isCancelledByAnotherInstance(com.sun.ejb.containers.RuntimeTimerState timerState)
isCancelledByAnotherInstance in class com.sun.ejb.containers.EJBTimerServiceprotected boolean redeliverTimeout(com.sun.ejb.containers.RuntimeTimerState timerState)
redeliverTimeout in class com.sun.ejb.containers.EJBTimerServiceprotected boolean isValidTimerForThisServer(com.sun.ejb.containers.TimerPrimaryKey timerId,
com.sun.ejb.containers.RuntimeTimerState timerState)
isValidTimerForThisServer in class com.sun.ejb.containers.EJBTimerServiceprotected void resetLastExpiration(com.sun.ejb.containers.TimerPrimaryKey timerId,
com.sun.ejb.containers.RuntimeTimerState timerState)
resetLastExpiration in class com.sun.ejb.containers.EJBTimerServiceprotected void expungeTimer(com.sun.ejb.containers.TimerPrimaryKey timerId,
boolean removeTimerBean)
expungeTimer in class com.sun.ejb.containers.EJBTimerServiceprotected boolean stopOnFailure()
stopOnFailure in class com.sun.ejb.containers.EJBTimerServiceprotected void resetEJBTimers(String target)
resetEJBTimers in class com.sun.ejb.containers.EJBTimerServiceCopyright © 2013. All Rights Reserved.