02/28/2005
 

com.epicentric.task
Class PersistentScheduler

java.lang.Object
  |
  +--com.epicentric.task.PersistentScheduler

Deprecated. As of version 4.0, to be removed in 8.0 or later. It has been replaced with TaskManager

public class PersistentScheduler
extends Object

This Scheduler executes from a collection of persistent tasks described in its database. Tasks are added to the database as follows: (new PersistentScheduler()).schedule(task); The PersistentScheduler can be started via this class' main(). It will read the database for all current tasks, find those due to be executed, and execute them.


Field Summary
static int COMPLAIN_AFTER_SLEEPING_TIMES
          Deprecated. if main() has slept this number of times waiting for a task to finish, complain on even multiples.
static int GIVE_UP_AFTER_SLEEPING_TIMES
          Deprecated. if main() is still sleeping after this number of iterations, waiting on a threaded task to complete, it'll give up.
static long SLEEP_INTERVAL
          Deprecated. msec for main() method to sleep if live tasks still exist.
 
Constructor Summary
PersistentScheduler()
          Deprecated.  
 
Method Summary
static void main(String[] args)
          Deprecated. Retrieve current tasks and execute them.
 void printHelp()
          Deprecated. Print help text.
 Vector run(String[] schedulerNames)
          Deprecated. Verify conditions will let me run.
 void schedule(Task task)
          Deprecated. Accept a Task and add it to my database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SLEEP_INTERVAL

public static final long SLEEP_INTERVAL
Deprecated. 
msec for main() method to sleep if live tasks still exist.

COMPLAIN_AFTER_SLEEPING_TIMES

public static final int COMPLAIN_AFTER_SLEEPING_TIMES
Deprecated. 
if main() has slept this number of times waiting for a task to finish, complain on even multiples.

GIVE_UP_AFTER_SLEEPING_TIMES

public static int GIVE_UP_AFTER_SLEEPING_TIMES
Deprecated. 
if main() is still sleeping after this number of iterations, waiting on a threaded task to complete, it'll give up. Usually, this number should be greater than COMPLAIN___.
Constructor Detail

PersistentScheduler

public PersistentScheduler()
Deprecated. 
Method Detail

main

public static void main(String[] args)
Deprecated. 
Retrieve current tasks and execute them. Presuming I am the main system thread, don't shut down until all tasks have finished execution.

schedule

public void schedule(Task task)
              throws SQLException,
                     IllegalArgumentException
Deprecated. 
Accept a Task and add it to my database.

run

public Vector run(String[] schedulerNames)
Deprecated. 
Verify conditions will let me run. If so, get current tasks, and if any, run them. When done, purge expired tasks from my database. Update the database for the rest.
Parameters:
schedulerNames - array of scheduler names to run for.
Returns:
vector of tasks I ran. Caller may want to do something with them. For instance, when I am being run from my static main() method, it will not end until all subtasks have ended.

printHelp

public void printHelp()
Deprecated. 
Print help text.

02/28/2005
 

Copyright and Trademark Notices