Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.javatools.parser.util
Class AsyncScheduler

java.lang.Object
  extended by oracle.javatools.parser.util.AsyncScheduler

public class AsyncScheduler
extends java.lang.Object

The AsyncScheduler is a part of a basic API to allow scheduling asynchronous tasks that support cancelling while the task is running. It is recommended that JSR 166 be used when it becomes available as part of the JDK later.

This scheduler schedules background threads to complete queued tasks. If there are no tasks queued, the background threads will exit.


Constructor Summary
AsyncScheduler(java.lang.String runnerPrefix, int idleTimeout)
          Construct a new AsyncScheduler.
AsyncScheduler(java.lang.String runnerPrefix, int idleTimeout, int maxThreads)
          Construct a new AsyncScheduler.
 
Method Summary
 void cancelTask(AsyncTask task)
          Cancel a pending task.
 void scheduleTask(AsyncTask task)
          Schedule a new task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncScheduler

public AsyncScheduler(java.lang.String runnerPrefix,
                      int idleTimeout)
Construct a new AsyncScheduler.

Parameters:
runnerPrefix - the prefix name for the runner threads
idleTimeout - the idle timeout that an idle thread waits before exiting

AsyncScheduler

public AsyncScheduler(java.lang.String runnerPrefix,
                      int idleTimeout,
                      int maxThreads)
Construct a new AsyncScheduler.

Parameters:
runnerPrefix - the prefix name for the runner threads
idleTimeout - the idle timeout that an idle thread waits before exiting
maxThreads - the number of concurrent max possible threads
Method Detail

scheduleTask

public void scheduleTask(AsyncTask task)
Schedule a new task.

Parameters:
task - the task to schedule

cancelTask

public void cancelTask(AsyncTask task)
Cancel a pending task.

Parameters:
task - the task to cancel

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.