|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.ejb.txtimer.DatabasePersistencePolicy
public class DatabasePersistencePolicy
This service implements a PersistencePolicy that persistes the timer to a database.
Field Summary |
---|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.ejb.txtimer.DatabasePersistencePolicyMBean |
---|
OBJECT_NAME |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
DatabasePersistencePolicy()
|
Method Summary | |
---|---|
void |
clearTimers()
Delete all persisted timers |
void |
deleteTimer(String timerId,
TimedObjectId timedObjectId)
Removes the timer from persistent storage. |
String |
getDatabasePersistencePlugin()
|
javax.management.ObjectName |
getDataSource()
|
void |
insertTimer(String timerId,
TimedObjectId timedObjectId,
Date firstEvent,
long intervalDuration,
Serializable info)
Creates the timer in persistent storage. |
List |
listTimerHandles()
Return a List of TimerHandle objects. |
List |
listTimerHandles(javax.management.ObjectName containerId,
ClassLoader loader)
List the persisted timer handles for a particular container |
void |
resetAndRestoreTimers()
Re-read the current persistent timers list, clear the db of timers, and restore the timers. |
void |
restoreTimers()
Restore the persistent timers seen during service startup |
void |
setDatabasePersistencePlugin(String dbpPluginClass)
The used database persistence plugin class |
void |
setDataSource(javax.management.ObjectName dataSource)
The used datasource |
void |
startService()
Initializes this service. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Constructor Detail |
---|
public DatabasePersistencePolicy()
Method Detail |
---|
public void startService() throws Exception
startService
in class org.jboss.system.ServiceMBeanSupport
Exception
public void insertTimer(String timerId, TimedObjectId timedObjectId, Date firstEvent, long intervalDuration, Serializable info)
insertTimer
in interface PersistencePolicy
timerId
- The timer idtimedObjectId
- The timed object idfirstEvent
- The point in time at which the first txtimer expiration must occur.intervalDuration
- The number of milliseconds that must elapse between txtimer expiration notifications.info
- A serializable handback object.public void deleteTimer(String timerId, TimedObjectId timedObjectId)
deleteTimer
in interface PersistencePolicy
timerId
- The timer idtimedObjectId
- The id of the timed objectpublic List listTimerHandles(javax.management.ObjectName containerId, ClassLoader loader)
listTimerHandles
in interface PersistencePolicy
containerId
- The Container ObjectNameloader
- The ClassLoader to use for loading the handles
public List listTimerHandles()
listTimerHandles
in interface PersistencePolicy
public void restoreTimers()
public void clearTimers()
clearTimers
in interface PersistencePolicy
public void resetAndRestoreTimers() throws SQLException
resetAndRestoreTimers
in interface DatabasePersistencePolicyMBean
SQLException
public javax.management.ObjectName getDataSource()
getDataSource
in interface DatabasePersistencePolicyMBean
public void setDataSource(javax.management.ObjectName dataSource)
DatabasePersistencePolicyMBean
setDataSource
in interface DatabasePersistencePolicyMBean
public String getDatabasePersistencePlugin()
getDatabasePersistencePlugin
in interface DatabasePersistencePolicyMBean
public void setDatabasePersistencePlugin(String dbpPluginClass)
DatabasePersistencePolicyMBean
setDatabasePersistencePlugin
in interface DatabasePersistencePolicyMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |