org.apache.openejb.core.timer
Class DatabaseTimerStore

java.lang.Object
  extended by org.apache.openejb.core.timer.DatabaseTimerStore
All Implemented Interfaces:
Serializable, TimerStore

public class DatabaseTimerStore
extends Object
implements TimerStore, Serializable

See Also:
Serialized Form

Constructor Summary
protected DatabaseTimerStore(String serverUniqueId, DataSource datasource, boolean useSequence)
           
 
Method Summary
 void addTimerData(TimerData timerData)
          Used to restore a Timer that was cancelled, but the Transaction has been rolled back.
 TimerData createCalendarTimer(EjbTimerServiceImpl timerService, String deploymentId, Object primaryKey, Method timeoutMethod, javax.ejb.ScheduleExpression schedule, javax.ejb.TimerConfig timerConfig)
           
 TimerData createIntervalTimer(EjbTimerServiceImpl timerService, String deploymentId, Object primaryKey, Method timeoutMethod, Date initialExpiration, long intervalDuration, javax.ejb.TimerConfig timerConfig)
           
 TimerData createSingleActionTimer(EjbTimerServiceImpl timerService, String deploymentId, Object primaryKey, Method timeoutMethod, Date expiration, javax.ejb.TimerConfig timerConfig)
           
 TimerData createTimer(EjbTimerServiceImpl timerService, String deploymentId, Object primaryKey, Object info, Date expiration, long intervalDuration)
           
 TimerData getTimer(String deploymentId, long timerId)
           
 Collection<TimerData> getTimers(String deploymentId)
           
 Collection<TimerData> loadTimers(EjbTimerServiceImpl timerService, String deploymentId)
           
 void removeTimer(long timerId)
           
 void updateIntervalTimer(TimerData timerData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseTimerStore

protected DatabaseTimerStore(String serverUniqueId,
                             DataSource datasource,
                             boolean useSequence)
                      throws SQLException
Throws:
SQLException
Method Detail

getTimer

public TimerData getTimer(String deploymentId,
                          long timerId)
Specified by:
getTimer in interface TimerStore

getTimers

public Collection<TimerData> getTimers(String deploymentId)
Specified by:
getTimers in interface TimerStore

createCalendarTimer

public TimerData createCalendarTimer(EjbTimerServiceImpl timerService,
                                     String deploymentId,
                                     Object primaryKey,
                                     Method timeoutMethod,
                                     javax.ejb.ScheduleExpression schedule,
                                     javax.ejb.TimerConfig timerConfig)
                              throws TimerStoreException
Specified by:
createCalendarTimer in interface TimerStore
Throws:
TimerStoreException

createIntervalTimer

public TimerData createIntervalTimer(EjbTimerServiceImpl timerService,
                                     String deploymentId,
                                     Object primaryKey,
                                     Method timeoutMethod,
                                     Date initialExpiration,
                                     long intervalDuration,
                                     javax.ejb.TimerConfig timerConfig)
                              throws TimerStoreException
Specified by:
createIntervalTimer in interface TimerStore
Throws:
TimerStoreException

createSingleActionTimer

public TimerData createSingleActionTimer(EjbTimerServiceImpl timerService,
                                         String deploymentId,
                                         Object primaryKey,
                                         Method timeoutMethod,
                                         Date expiration,
                                         javax.ejb.TimerConfig timerConfig)
                                  throws TimerStoreException
Specified by:
createSingleActionTimer in interface TimerStore
Throws:
TimerStoreException

createTimer

public TimerData createTimer(EjbTimerServiceImpl timerService,
                             String deploymentId,
                             Object primaryKey,
                             Object info,
                             Date expiration,
                             long intervalDuration)
                      throws TimerStoreException
Throws:
TimerStoreException

addTimerData

public void addTimerData(TimerData timerData)
                  throws TimerStoreException
Used to restore a Timer that was cancelled, but the Transaction has been rolled back.

Specified by:
addTimerData in interface TimerStore
Throws:
TimerStoreException

removeTimer

public void removeTimer(long timerId)
Specified by:
removeTimer in interface TimerStore

loadTimers

public Collection<TimerData> loadTimers(EjbTimerServiceImpl timerService,
                                        String deploymentId)
                                 throws TimerStoreException
Specified by:
loadTimers in interface TimerStore
Throws:
TimerStoreException

updateIntervalTimer

public void updateIntervalTimer(TimerData timerData)
Specified by:
updateIntervalTimer in interface TimerStore


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.