|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.utils.ThreadSynchronization
org.jppf.jca.work.submission.JPPFSubmissionManager
public class JPPFSubmissionManager
This task provides asynchronous management of tasks submitted through the resource adapter. It relies on a queue where job are first added, then submitted when a driver connection becomes available. It also provides methods to check the status of a submission and retrieve the results.
| Nested Class Summary | |
|---|---|
class |
JPPFSubmissionManager.JobSubmission
Wrapper for submitting a job. |
| Field Summary |
|---|
| Fields inherited from class org.jppf.utils.ThreadSynchronization |
|---|
stopped |
| Constructor Summary | |
|---|---|
JPPFSubmissionManager(JPPFJcaClient client)
Initialize this submission worker with the specified JPPF client. |
|
| Method Summary | |
|---|---|
String |
addExistingSubmission(JPPFJob job)
Add an existing submission back into the execution queue. |
String |
addSubmission(JPPFJob job)
Add a task submission to the execution queue. |
String |
addSubmission(JPPFJob job,
SubmissionStatusListener listener)
Add a task submission to the execution queue. |
Collection<String> |
getAllSubmissionIds()
Get the ids of all currently available submissions. |
JPPFSubmissionResult |
peekSubmission(String id)
Get a submission given its id, without removing it from this submissison manager. |
JPPFSubmissionResult |
pollSubmission(String id)
Get a submission given its id, and remove it from this submissison manager. |
void |
release()
Stop this submission manager. |
void |
run()
Run the loop of this submission manager, watching for the queue and starting a job when the queue has one and a connnection is available. |
| Methods inherited from class org.jppf.utils.ThreadSynchronization |
|---|
goToSleep, goToSleep, goToSleep, isStopped, setStopped, wakeUp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JPPFSubmissionManager(JPPFJcaClient client)
client - the JPPF client that manages connections to the JPPF drivers.| Method Detail |
|---|
public void release()
release in interface WorkWork.release()public void run()
run in interface RunnableRunnable.run()public String addSubmission(JPPFJob job)
job - encapsulation of the execution data.
public String addSubmission(JPPFJob job,
SubmissionStatusListener listener)
job - encapsulation of the execution data.listener - an optional listener to receive submission status change notifications, may be null.
public String addExistingSubmission(JPPFJob job)
job - encapsulation of the execution data.
public JPPFSubmissionResult peekSubmission(String id)
id - the id of the submission to find.
public JPPFSubmissionResult pollSubmission(String id)
id - the id of the submission to find.
public Collection<String> getAllSubmissionIds()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||