Esri Geoportal Server
1.0

Package com.esri.gpt.framework.scheduler

Thread scheduler.

See:
          Description

Interface Summary
IScheduledTask Scheduled task definition.
 

Class Summary
FileCleanup Performs file clean up operation server communication.
FileCleanupThread Document cleanup background thread.
ThreadDefinition Thread definition.
ThreadScheduler Thread scheduler.
ThreadSchedulerConfiguration Collection of thread definitions.
 

Package com.esri.gpt.framework.scheduler Description

Thread scheduler. Provides mechanizm to schedule threads defined in xml configuration file. Entire configuration can be loaded into the Configuration Object.

Configuration

Configuration of the scheduler can be read from XML configuration file. Typically, node <scheduler> as a root node will hold entire scheduler configuration, although the name of the root node can be freely choosen.
Configuration of the scheduler consist of specific attributes assigned to the scheduler root node, and zero or more <thread> nodes as children of the root node.
Attributes:
Root node can have the following attibutes:
Threads:
Each thread is defined by node called: <thread>. Therad definition includes a classpath to the worker thread and timing definitions allowing to schedule therad.
Delay and period:
Both, delay and period attributes are, by default, described by the number which is a time in milliseconds. This is also possible to declare time unit.
Time unit can be one of the following, self explanatory strings:

[MILLISECOND], [SECOND], [MINUTE], [HOUR], [DAY], [WEEK], [MONTH]

Examples:
1. Schedule thread to execute once only, five minutes after application start:
   <thread class="my.runnable" delay='5[MINUTE]'/>
 
2. Schedule thread to execute every day at five o'clock am.:
   <thread class="my.runnable" at='05:00'/>
 
3. Schedule thread to be executed periodically with period of 2 hours and initial delay of 5000 milliseconds:
   <thread class="my.runnable" period='2[HOUR]' delay='5000'/> 
or
   <thread class="my.runnable" period='2[HOUR]' delay='5[SECOND]'/>
 

See Also:
ThreadSchedulerConfiguration, ScheduledExecutorService, ScheduledFuture

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.