org.mobicents.timers
Class TimerTaskData

java.lang.Object
  extended by org.mobicents.timers.TimerTaskData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FaultTolerantTimerTimerTaskData

public class TimerTaskData
extends java.lang.Object
implements java.io.Serializable

The TimerTask data, which may be replicated in a cluster environment to support fail over.

Author:
martins
See Also:
Serialized Form

Constructor Summary
TimerTaskData(java.io.Serializable id, long startTime, long period, PeriodicScheduleStrategy periodicScheduleStrategy)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getPeriod()
          Retrieves the period of the associated timer task execution, -1 means it is not a periodic task.
 PeriodicScheduleStrategy getPeriodicScheduleStrategy()
          Retrieves the strategy used in a periodic timer task, can be null if it is not a periodic timer task.
 long getStartTime()
          Retrieves the starting time of the associated timer task execution.
 java.io.Serializable getTaskID()
          Retrieves the id of the associated timer task.
 int hashCode()
           
 void setStartTime(long startTime)
          Sets the starting time of the associated timer task execution.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerTaskData

public TimerTaskData(java.io.Serializable id,
                     long startTime,
                     long period,
                     PeriodicScheduleStrategy periodicScheduleStrategy)
Parameters:
id -
startTime -
period -
Method Detail

getPeriod

public long getPeriod()
Retrieves the period of the associated timer task execution, -1 means it is not a periodic task.

Returns:

getStartTime

public long getStartTime()
Retrieves the starting time of the associated timer task execution.

Returns:

setStartTime

public void setStartTime(long startTime)
Sets the starting time of the associated timer task execution.

Parameters:
startTime -

getTaskID

public java.io.Serializable getTaskID()
Retrieves the id of the associated timer task.

Returns:

getPeriodicScheduleStrategy

public PeriodicScheduleStrategy getPeriodicScheduleStrategy()
Retrieves the strategy used in a periodic timer task, can be null if it is not a periodic timer task.

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010. All Rights Reserved.