org.jboss.ejb.txtimer
Interface PersistencePolicy


public interface PersistencePolicy

Timers are persistent objects. In the event of a container crash, any single-event timers that have expired during the intervening time before container restart must cause the ejbTimeout method to be invoked upon restart. Any interval timers that have expired during the intervening time must cause the ejb- Timeout method to be invoked at least once upon restart.

Since:
09-Sep-2004

Method Summary
 void clearTimers()
          Clear the persisted timers
 void deleteTimer(java.lang.String timerId, TimedObjectId (src)  timedObjectId)
          Deletes a timer from persistent storage.
 void insertTimer(java.lang.String timerId, TimedObjectId (src)  targetId, java.util.Date firstEvent, long periode, java.io.Serializable info)
          Inserts a timer into persistent storage.
 java.util.List listTimerHandles()
          Return a List of TimerHandle objects.
 void restoreTimers()
          Restore the persistet timers
 

Method Detail

insertTimer

public void insertTimer(java.lang.String timerId,
                        TimedObjectId (src)  targetId,
                        java.util.Date firstEvent,
                        long periode,
                        java.io.Serializable info)
Inserts a timer into persistent storage.

Parameters:
timerId - The timer id
targetId - The timed object id
firstEvent - The point in time at which the first txtimer expiration must occur.
periode - The number of milliseconds that must elapse between txtimer expiration notifications.
info - A serializable handback object.

deleteTimer

public void deleteTimer(java.lang.String timerId,
                        TimedObjectId (src)  timedObjectId)
Deletes a timer from persistent storage.

Parameters:
timerId - The timer id
timedObjectId - The id of the timed object

clearTimers

public void clearTimers()
Clear the persisted timers


restoreTimers

public void restoreTimers()
Restore the persistet timers


listTimerHandles

public java.util.List listTimerHandles()
Return a List of TimerHandle objects.