org.jboss.ejb.txtimer
Class NoopPersistencePolicy

java.lang.Object
  extended by org.jboss.ejb.txtimer.NoopPersistencePolicy
All Implemented Interfaces:
NoopPersistencePolicyMBean, PersistencePolicy

public class NoopPersistencePolicy
extends Object
implements NoopPersistencePolicyMBean

This service implements a PersistencePolicy that does not persist the timer.

Since:
09-Sep-2004
Version:
$Revision: 57209 $
Author:
Thomas.Diesler@jboss.org, Dimitris.Andreadis@jboss.org

Field Summary
 
Fields inherited from interface org.jboss.ejb.txtimer.NoopPersistencePolicyMBean
OBJECT_NAME
 
Constructor Summary
NoopPersistencePolicy()
           
 
Method Summary
 void clearTimers()
          Delete all persisted timers
 void deleteTimer(String timerId, TimedObjectId timedObjectId)
          Removes the timer from persistent storage.
 void insertTimer(String timerId, TimedObjectId timedObjectId, Date firstEvent, long periode, 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
 List listTimerHandles(TimedObjectId timedObjectId)
          List the persisted timers for a particular TimerObjectId, or all persisted timers if timedObjectId is null.
 void restoreTimers()
          Restore the persistet timers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoopPersistencePolicy

public NoopPersistencePolicy()
Method Detail

insertTimer

public void insertTimer(String timerId,
                        TimedObjectId timedObjectId,
                        Date firstEvent,
                        long periode,
                        Serializable info)
Creates the timer in persistent storage.

Specified by:
insertTimer in interface PersistencePolicy
Parameters:
timerId - The timer id
timedObjectId - The timed object id
firstEvent - The point in time at which the first txtimer expiration must occur.
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(String timerId,
                        TimedObjectId timedObjectId)
Removes the timer from persistent storage.

Specified by:
deleteTimer in interface PersistencePolicy
Parameters:
timerId - The timer id
timedObjectId - The id of the timed object

clearTimers

public void clearTimers()
Delete all persisted timers

Specified by:
clearTimers in interface PersistencePolicy

restoreTimers

public void restoreTimers()
Restore the persistet timers


listTimerHandles

public List listTimerHandles(javax.management.ObjectName containerId,
                             ClassLoader loader)
List the persisted timer handles

Specified by:
listTimerHandles in interface PersistencePolicy
Parameters:
loader - The ClassLoader to use for loading the handles
containerId - The Container ObjectName
Returns:
a list of TimerHandleImpl objects

listTimerHandles

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

Specified by:
listTimerHandles in interface PersistencePolicy
Returns:
a list of TimerHandleImpl objects

listTimerHandles

public List listTimerHandles(TimedObjectId timedObjectId)
List the persisted timers for a particular TimerObjectId, or all persisted timers if timedObjectId is null.

Parameters:
timedObjectId - The id of the timed object, or null
Returns:
a list of TimerHandleImpl objects


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.