rcf.core.framework.services
Class AbstractService
java.lang.Object
rcf.core.concurrent.events.AbstractEventSource
rcf.core.concurrent.schedule.AbstractTask
rcf.core.framework.services.AbstractService
- All Implemented Interfaces:
- Runnable, EventSource, ConcurrentRunnableTask, InterruptibleTask, RunnableTask, Task, Service
@Revision(value="$Revision: 1.3 $",
date="$Date: 2006/12/06 16:50:28 $",
tag="$Name: $")
public abstract class AbstractService- extends AbstractTask
- implements Service
TODO: Javadoc
Upon receiving a commit event, services should check if something is in progress, and commit if not.
Services should also stop accepting new work.
Upon receiving an interrupt event services should interrupt in-progress work.
The interruption should be as clean as possible, but must terminate very quickly.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize
TODO: equals, hashCode, toString
- Version:
- $Revision: 1.3 $
- Author:
- Greg Gibeling
| Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task |
Task.State |
|
Method Summary |
void |
commit()
TODO: Javadoc
Fully commit. |
String |
getSummary()
TODO: Javadoc |
Version |
getVersion()
TODO: Javadoc |
void |
interrupt()
TODO: Javadoc
Stop running VERY quickly, something has happened that requires
an immediate cessation of computation. |
void |
run()
TODO: Javadoc
Starts the task running. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface rcf.core.concurrent.schedule.Task |
taskState |
AbstractService
public AbstractService()
commit
public void commit()
- Description copied from interface:
ConcurrentRunnableTask
- TODO: Javadoc
Fully commit. Stop accepting new work and gracefully finish anything that's in progress.
Transition to
Task.State.Committing and then Task.State.Committed.
If the commit takes too long (stays in Task.State.Committing), the ConcurrentRunnableTask.interrupt() method may be
used to force an immediate cessation of activity.
- Specified by:
commit in interface ConcurrentRunnableTask
getSummary
public String getSummary()
- Description copied from interface:
Service
- TODO: Javadoc
- Specified by:
getSummary in interface Service
- Returns:
getVersion
public Version getVersion()
- Description copied from interface:
Service
- TODO: Javadoc
- Specified by:
getVersion in interface Service
- Returns:
interrupt
public void interrupt()
- Description copied from interface:
ConcurrentRunnableTask
- TODO: Javadoc
Stop running VERY quickly, something has happened that requires
an immediate cessation of computation.
Transition to
Task.State.Interrupting and then Task.State.Interrupted
- Specified by:
interrupt in interface ConcurrentRunnableTask- Specified by:
interrupt in interface InterruptibleTask
- See Also:
InterruptibleTask.interrupt()
run
public void run()
- Description copied from interface:
ConcurrentRunnableTask
- TODO: Javadoc
Starts the task running.
May not perform the majority of the work, may just spawn worker threads, etc...
- Specified by:
run in interface Runnable- Specified by:
run in interface ConcurrentRunnableTask- Specified by:
run in interface RunnableTask
- See Also:
RunnableTask.run()