net.sourceforge.basher
Interface Scheduler

All Known Implementing Classes:
SchedulerImpl

public interface Scheduler

Defines operations for interacting with the scheduler service. Users of the scheduler can stop and start the scheduler, add and remove threads and retrieve statistics about currently running threads.

Version:
1.0
Author:
Johan Lindquist

Method Summary
 void addThread()
          Adds a thread to the currently running scheduler.
 void addThreads(int numToAdd)
          Adds the specified number of threads to the currently running scheduler.
 Phase getCurrentPhase()
          Removes a thread from the currently running scheduler
 int getNumberOfActiveThreads()
          Retrieves the number of threads currently active in the scheduler.
 boolean isRunning()
          Checks whether or not the scheduler is running.
 void removeAllThreads()
          Removes all threads from the currently running scheduler
 void removeThread()
          Removes a thread from the currently running scheduler
 void start()
          Starts the scheduler.
 void start(BasherContext basherContext)
           
 void start(String contextName)
           
 void stop()
          Stops the scheduler.
 

Method Detail

addThread

void addThread()
Adds a thread to the currently running scheduler.


addThreads

void addThreads(int numToAdd)
Adds the specified number of threads to the currently running scheduler.

Parameters:
numToAdd - The number of threads to add

removeThread

void removeThread()
Removes a thread from the currently running scheduler


removeAllThreads

void removeAllThreads()
Removes all threads from the currently running scheduler


stop

void stop()
Stops the scheduler.


start

void start()
Starts the scheduler.


start

void start(String contextName)
Parameters:
contextName -

start

void start(BasherContext basherContext)
Parameters:
basherContext -

getNumberOfActiveThreads

int getNumberOfActiveThreads()
Retrieves the number of threads currently active in the scheduler.

Returns:
The number of currently active threads

isRunning

boolean isRunning()
Checks whether or not the scheduler is running.

Returns:
True if the scheduler is running, otherwise false.

getCurrentPhase

Phase getCurrentPhase()
Removes a thread from the currently running scheduler



Copyright © 2006-2010 Basher Team. All Rights Reserved.