Package org.jboss.as.ejb3.timerservice
Enum TimerState
- java.lang.Object
-
- java.lang.Enum<TimerState>
-
- org.jboss.as.ejb3.timerservice.TimerState
-
- All Implemented Interfaces:
Serializable,Comparable<TimerState>
public enum TimerState extends Enum<TimerState>
Timer states. Following is the possible timer state transitions:-
CREATED- on create -
CREATED->ACTIVE- when started without Tx -
ACTIVE->CANCELED- on cancel() without Tx -
ACTIVE->IN_TIMEOUT- on TimerTask run -
IN_TIMEOUT->ACTIVE- on Tx commit if intervalDuration > 0 -
IN_TIMEOUT->EXPIRED-> on Tx commit if intervalDuration == 0 -
IN_TIMEOUT->RETRY_TIMEOUT-> on Tx rollback -
RETRY_TIMEOUT->ACTIVE-> on Tx commit/rollback if intervalDuration > 0 -
RETRY_TIMEOUT->EXPIRED-> on Tx commit/rollback if intervalDuration == 0
- Version:
- $Revision: $
- Author:
- Jaikiran Pai
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVEState indicating that the timer is active and will receive any timeout notificationsCANCELEDState indicating that the timer has been cancelled and will not receive any future timeout notificationsCREATEDState indicating that a timer has been created.EXPIREDState indicating that there aren't any scheduled timeouts for this timerIN_TIMEOUTState indicating that the timer has received a timeout notification and is processing the timeout taskRETRY_TIMEOUTState indicating that the timeout task has to be retried
-
Field Summary
Fields Modifier and Type Field Description static Set<TimerState>CREATED_ACTIVE_IN_TIMEOUT_RETRY_TIMEOUTstatic Set<TimerState>EXPIRED_CANCELED
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TimerStatevalueOf(String name)Returns the enum constant of this type with the specified name.static TimerState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATED
public static final TimerState CREATED
State indicating that a timer has been created.
-
ACTIVE
public static final TimerState ACTIVE
State indicating that the timer is active and will receive any timeout notifications
-
CANCELED
public static final TimerState CANCELED
State indicating that the timer has been cancelled and will not receive any future timeout notifications
-
EXPIRED
public static final TimerState EXPIRED
State indicating that there aren't any scheduled timeouts for this timer
-
IN_TIMEOUT
public static final TimerState IN_TIMEOUT
State indicating that the timer has received a timeout notification and is processing the timeout task
-
RETRY_TIMEOUT
public static final TimerState RETRY_TIMEOUT
State indicating that the timeout task has to be retried
-
-
Field Detail
-
CREATED_ACTIVE_IN_TIMEOUT_RETRY_TIMEOUT
public static final Set<TimerState> CREATED_ACTIVE_IN_TIMEOUT_RETRY_TIMEOUT
-
EXPIRED_CANCELED
public static final Set<TimerState> EXPIRED_CANCELED
-
-
Method Detail
-
values
public static TimerState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TimerState c : TimerState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimerState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-