com.waveset.task
Interface SchedulerMBean

All Known Implementing Classes:
Scheduler

public interface SchedulerMBean


Field Summary
static java.lang.String NAME
           
static java.lang.String OBJECT_NAME
           
static int RESUMED
           
static int STARTED
           
static java.lang.String[] STATUS
          Constants to display the current status as known to the bean.
static int STOPPED
           
static int SUSPENDED
           
 
Method Summary
 int getCycles()
          The number of second we want to sleep between cycles.
 int getErrorCount()
          The number of exceptions we've caught during task processing.
 int getExpiredCount()
          The number of finished tasks we've expired.
 int getFinishedCycleCounter()
          The number of seconds we've been waiting for a finished cycle.
 int getFinishedCycleTime()
          The cycle time in seconds for processing FINISHED tasks.
 int getLaunchedCount()
          The number of scheduled tasks we've launched.
 long getMostRecentHeartbeat()
          Gets the date of the most recent heartbeat from the scheduler in ms.
 int getReadyCount()
          The number of ready tasks we've executed during the ready cycle.
 int getReadyCycleCounter()
          The number of seconds we've been waiting for a ready cycle.
 int getReadyCycleTime()
          The cycle time in seconds for processing READY tasks.
 int getScheduledCycleCounter()
          The number of seconds we've been waiting for a scheduled cycle.
 int getScheduledCycleTime()
          The cycle time in seconds for processing SCHEDULED tasks.
 int getStatus()
          Get state as an integer.
 java.lang.String getStatusDisplay()
          Get the state in a displayable string.
 

Field Detail

STATUS

public static final java.lang.String[] STATUS
Constants to display the current status as known to the bean.


STOPPED

public static final int STOPPED
See Also:
Constant Field Values

STARTED

public static final int STARTED
See Also:
Constant Field Values

SUSPENDED

public static final int SUSPENDED
See Also:
Constant Field Values

RESUMED

public static final int RESUMED
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

OBJECT_NAME

public static final java.lang.String OBJECT_NAME
See Also:
Constant Field Values
Method Detail

getMostRecentHeartbeat

public long getMostRecentHeartbeat()
Gets the date of the most recent heartbeat from the scheduler in ms.

Returns:
Returns in ms the most recent heartbeat.

getStatus

public int getStatus()
Get state as an integer.


getStatusDisplay

public java.lang.String getStatusDisplay()
Get the state in a displayable string.


getCycles

public int getCycles()
The number of second we want to sleep between cycles. We may not always do something each cycle, other cycle times affect what we will do. This must be the smallest of all cycle times.

It should be relatively small so we can respond to scheduler control events like changing cycle times, requesting an immediate cycle, shutting down the thread, etc.

Returns:
Returns the current cycle time in seconds.

getReadyCount

public int getReadyCount()
The number of ready tasks we've executed during the ready cycle. This won't include tasks executed synchronously through the API, only those we discovered in the READY state in the repository.


getLaunchedCount

public int getLaunchedCount()
The number of scheduled tasks we've launched.


getExpiredCount

public int getExpiredCount()
The number of finished tasks we've expired.


getErrorCount

public int getErrorCount()
The number of exceptions we've caught during task processing.


getReadyCycleTime

public int getReadyCycleTime()
The cycle time in seconds for processing READY tasks.


getReadyCycleCounter

public int getReadyCycleCounter()
The number of seconds we've been waiting for a ready cycle.


getScheduledCycleTime

public int getScheduledCycleTime()
The cycle time in seconds for processing SCHEDULED tasks.


getScheduledCycleCounter

public int getScheduledCycleCounter()
The number of seconds we've been waiting for a scheduled cycle.


getFinishedCycleTime

public int getFinishedCycleTime()
The cycle time in seconds for processing FINISHED tasks.


getFinishedCycleCounter

public int getFinishedCycleCounter()
The number of seconds we've been waiting for a finished cycle.