live.threads
Class SequentialRunner
java.lang.Object
java.lang.Thread
live.threads.ThreadedUserAction
live.threads.Runner
live.threads.SequentialRunner
- All Implemented Interfaces:
- Runnable
- public class SequentialRunner
- extends Runner
This is a runner that runs each of the threads in the container in sequence.
This is used for tasks that are sequential, so that if a task fails all
subsequent tasks should be cancelled. If you want a container that will try
to run all tasks even if one fails but only lets one task be active at any
given time, use ParallelRunner with an parallelism of 1. See
(TODO) ParallelRunner's docs for specifics.
- Author:
- Evan Driscoll
Method Summary |
protected void |
runImpl()
Starts the threads one at a time, cancels the rest of the threads if one fails |
Methods inherited from class live.threads.ThreadedUserAction |
getCache, getException, getID, getStatus, getTimeFinished, getTimeStarted, init, init, isFinished, result, run, setComplete, setError, setError, setIndeterminate, setIndeterminate, setInProgress, startJoinForever, startJoinTimeout, startNoJoin, toString |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
SequentialRunner
public SequentialRunner(ThreadInitInfo initInfo,
String description)
- Creates a new sequential runner class
- Parameters:
initInfo
- Information needed to start the threaddescription
- Description of the thread
runImpl
protected void runImpl()
throws Exception
- Starts the threads one at a time, cancels the rest of the threads if one fails
- Specified by:
runImpl
in class ThreadedUserAction
- Throws:
Exception
- See Also:
ThreadedUserAction.run()
Copyright © 2005