Package com.sun.jini.mahalo
Class Job
java.lang.Object
com.sun.jini.mahalo.Job
- Direct Known Subclasses:
AbortJob,CommitJob,PrepareAndCommitJob,PrepareJob
A
Job manages the division of work for a problem whose solution is obtained by
assembling partial results to original problem.- Author:
- Sun Microsystems, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJob(TaskManager pool, WakeupManager wm, boolean directCall) Create theJobobject giving it theTaskManagerresponsible for the pool of threads which perform the necessary work. -
Method Summary
Modifier and TypeMethodDescriptionprotected WakeupManagergetMgr()Returns a reference to theWakeupManagerwhich provides the scheduling of tasks created by thisJobprotected TaskManagergetPool()Returns a reference to theTaskManagerwhich supplies the threads used to executed tasks created by thisJobbooleanisCompleted(long waitFor) Check to see if theJobexecution has completed.booleanprotected booleanprotected voidreportDone(TaskManager.Task who, Object param) voidSchedules tasks for executionvoidstop()Halt all of the work being performed by theJob
-
Field Details
-
pending
protected int pending -
results
-
tasks
-
_directCall
protected final boolean _directCall
-
-
Constructor Details
-
Job
Create theJobobject giving it theTaskManagerresponsible for the pool of threads which perform the necessary work.- Parameters:
pool- theTaskManagerwhich provides the threads
-
-
Method Details
-
scheduleTasks
public void scheduleTasks()Schedules tasks for execution -
getPool
Returns a reference to theTaskManagerwhich supplies the threads used to executed tasks created by thisJob -
getMgr
Returns a reference to theWakeupManagerwhich provides the scheduling of tasks created by thisJob -
reportDone
- Throws:
JobException
-
isCompleted
Check to see if theJobexecution has completed.- Parameters:
waitFor- The amount of time the caller is willing to wait for the completion status to arrive.- Throws:
JobException
-
stop
public void stop()Halt all of the work being performed by theJob -
isDirectCall
public boolean isDirectCall() -
numberOfRetriesDueToConnectionExceptionExceeded
-