public class DatabaseTimerPersistence extends Object implements TimerPersistence, org.jboss.msc.service.Service<DatabaseTimerPersistence>
SERVICE_NAME
Constructor and Description |
---|
DatabaseTimerPersistence(String name,
String database,
String partition) |
Modifier and Type | Method and Description |
---|---|
void |
addTimer(TimerImpl timerEntity)
Called when a timer is being persisted
|
Object |
deSerialize(String data) |
org.jboss.msc.value.InjectedValue<ManagedReferenceFactory> |
getDataSourceInjectedValue() |
org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader> |
getModuleLoader() |
DatabaseTimerPersistence |
getValue() |
List<TimerImpl> |
loadActiveTimers(String timedObjectId,
TimerServiceImpl timerService)
Load all active timers for the given object.
|
void |
persistTimer(TimerImpl timerEntity)
Called when a timer is being persisted
|
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
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
|
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<DatabaseTimerPersistence>
org.jboss.msc.service.StartException
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<DatabaseTimerPersistence>
public void addTimer(TimerImpl timerEntity)
TimerPersistence
addTimer
in interface TimerPersistence
public void persistTimer(TimerImpl timerEntity)
TimerPersistence
persistTimer
in interface TimerPersistence
public void timerUndeployed(String timedObjectId)
TimerPersistence
timerUndeployed
in interface TimerPersistence
public List<TimerImpl> loadActiveTimers(String timedObjectId, TimerServiceImpl timerService)
TimerPersistence
loadActiveTimers
in interface TimerPersistence
timedObjectId
- The timed object id to load timers forpublic DatabaseTimerPersistence getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface org.jboss.msc.value.Value<DatabaseTimerPersistence>
IllegalStateException
IllegalArgumentException
public Object deSerialize(String data) throws SQLException
SQLException
public org.jboss.msc.value.InjectedValue<ManagedReferenceFactory> getDataSourceInjectedValue()
public org.jboss.msc.value.InjectedValue<org.jboss.modules.ModuleLoader> getModuleLoader()
Copyright © 2015 JBoss by Red Hat. All rights reserved.