public abstract class Job extends Object
Job manages the division of work for a problem
 whose solution is obtained by assembling partial results to
 original problem.| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | _directCall | 
| protected int | pending | 
| protected Object[] | results | 
| protected Map | tasks | 
| Constructor and Description | 
|---|
| Job(com.sun.jini.thread.TaskManager pool,
   com.sun.jini.thread.WakeupManager wm,
   boolean directCall)Create the  Jobobject giving it theTaskManagerresponsible for the pool of
 threads which perform the necessary work. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected com.sun.jini.thread.WakeupManager | getMgr()Returns a reference to the  WakeupManagerwhich
 provides the scheduling of tasks created by
 thisJob | 
| protected com.sun.jini.thread.TaskManager | getPool()Returns a reference to the  TaskManagerwhich
 supplies the threads used to executed tasks created by
 thisJob | 
| boolean | isCompleted(long waitFor)Check to see if the  Jobexecution has
 completed. | 
| boolean | isDirectCall() | 
| protected boolean | numberOfRetriesDueToConnectionExceptionExceeded(com.sun.jini.thread.TaskManager.Task who) | 
| protected void | reportDone(com.sun.jini.thread.TaskManager.Task who,
          Object param) | 
| void | scheduleTasks()Schedules tasks for execution | 
| void | stop()Halt all of the work being performed  by
 the  Job | 
protected int pending
protected Object[] results
protected Map tasks
protected final boolean _directCall
public Job(com.sun.jini.thread.TaskManager pool,
           com.sun.jini.thread.WakeupManager wm,
           boolean directCall)
Job object giving it the
 TaskManager responsible for the pool of
 threads which perform the necessary work.pool - the TaskManager which provides the threadspublic void scheduleTasks()
protected com.sun.jini.thread.TaskManager getPool()
TaskManager which
 supplies the threads used to executed tasks created by
 this Jobprotected com.sun.jini.thread.WakeupManager getMgr()
WakeupManager which
 provides the scheduling of tasks created by
 this Jobprotected void reportDone(com.sun.jini.thread.TaskManager.Task who,
                          Object param)
                   throws JobException
JobExceptionpublic boolean isCompleted(long waitFor)
                    throws JobException
Job execution has
 completed.waitFor - The amount of time the caller is willing
                        to wait for the completion status to arrive.JobExceptionpublic void stop()
Jobpublic boolean isDirectCall()
protected boolean numberOfRetriesDueToConnectionExceptionExceeded(com.sun.jini.thread.TaskManager.Task who)
Copyright © GigaSpaces.