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)
Invoked before running a timer in order to determine if this node should run the timer.
|
default void |
timerDeployed(String timedObjectId)
Signals that the timer is being deployed and any internal structured required should be added.
|
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)
timer - The timerdefault void timerDeployed(String timedObjectId)
timedObjectId - void 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 © 2021 JBoss by Red Hat. All rights reserved.