public interface TimerPersistence
Modifier and Type | Interface and Description |
---|---|
static interface |
TimerPersistence.TimerChangeListener
Listener that gets invoked when a new timer is added to the underlying store.
|
Modifier and Type | Field and Description |
---|---|
static org.jboss.msc.service.ServiceName |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
void |
addTimer(TimerImpl timer)
Called when a timer is being persisted
|
List<TimerImpl> |
loadActiveTimers(String timedObjectId,
TimerServiceImpl timerService)
Load all active timers for the given object.
|
void |
persistTimer(TimerImpl timer)
Called when a timer is being persisted
|
Closeable |
registerChangeListener(String timedObjectId,
TimerPersistence.TimerChangeListener listener)
Registers a listener to listed for new timers that are added to the database.
|
boolean |
shouldRun(TimerImpl timer,
TransactionManager txManager)
Invoked before running a timer in order to determine if this node should run the timer.
|
void |
timerUndeployed(String timedObjectId)
Signals that a timer is being undeployed, and all cached data relating to this object should
be dropped to prevent a class loader leak
|
void addTimer(TimerImpl timer)
timer
- The timervoid persistTimer(TimerImpl timer)
timer
- The timerboolean shouldRun(TimerImpl timer, TransactionManager txManager)
timer
- The timertxManager
- Transaction manager to be able to create a transactionvoid timerUndeployed(String timedObjectId)
timedObjectId
- List<TimerImpl> loadActiveTimers(String timedObjectId, TimerServiceImpl timerService)
timedObjectId
- The timed object id to load timers forCloseable registerChangeListener(String timedObjectId, TimerPersistence.TimerChangeListener listener)
timedObjectId
- The timed objectlistener
- The listenerCopyright © 2017 JBoss by Red Hat. All rights reserved.