Package org.jppf.client
Class JPPFDriverJobPersistence
java.lang.Object
org.jppf.client.JPPFDriverJobPersistence
Instances of this class allow monitoring and managing, on the client side, the jobs persisted in a remote driver.
In particular, it allows to retrieve jobs from the driver's persistence store and either process their results if they have completed,
or resubmit them vith a
JPPFClient.
The communication with the driver is performed via JMX, thus a working JMX connection to the driver must be provided in the constructor.
- Since:
- 6.0
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionJPPFDriverJobPersistence(org.jppf.management.JMXDriverConnectionWrapper jmx) Initialize this persisted job manager with the specified driver JMX connection. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDelete the persisted job with the specified uuid.deleteJobs(org.jppf.job.JobSelector selector) Delete the persisted jobs that match the provided job selector.org.jppf.node.protocol.JPPFDistributedJobgetJobDescription(String uuid) Get the description of the job with the specified uuid.booleanisJobComplete(String uuid) Determines whether the job has completed and all execution results are available.listJobs(org.jppf.job.JobSelector selector) List the persisted jobs that match the provided job selector.retrieveJob(String uuid) Retieve and rebuild the persisted job with the specified uuid.
-
Constructor Details
-
JPPFDriverJobPersistence
public JPPFDriverJobPersistence(org.jppf.management.JMXDriverConnectionWrapper jmx) Initialize this persisted job manager with the specified driver JMX connection.- Parameters:
jmx- a JMX connection wrapper to a JPPF driver.- Throws:
IllegalStateException- if the connection to the driver isn't working for any reason. The actual exception is set as root cause.
-
-
Method Details
-
listJobs
List the persisted jobs that match the provided job selector.- Parameters:
selector- the selector used to filter persisted jobs, anullselector is equivalent toJobSelector.ALL_JOBS.- Returns:
- a list of the uuids of the matching jobs, possibly empty if no job was found.
- Throws:
Exception- if any error occurs while communicating with the driver.
-
deleteJob
Delete the persisted job with the specified uuid. This method is equivalent to callingdeleteJobs(new JobUuidSelector(uuid)).- Parameters:
uuid- the UUID of the job to delete.- Returns:
trueif the job was successfully deleted,false.otherwise.- Throws:
Exception- if any error occurs while communicating with the driver.
-
deleteJobs
Delete the persisted jobs that match the provided job selector.- Parameters:
selector- the selector used to filter persisted jobs, anullselector is equivalent toJobSelector.ALL_JOBS.- Returns:
- a list of the uuids of the matching jobs that were actually deleted, possibly empty if no job was found.
- Throws:
Exception- if any error occurs while communicating with the driver.
-
retrieveJob
Retieve and rebuild the persisted job with the specified uuid. -
getJobDescription
Get the description of the job with the specified uuid. This method retrieves the job's uuid, name, number of tasks, SLA and metadata.- Parameters:
uuid- the uuid of the job to retrieve.- Returns:
- the job descirption as a
JPPFDistributedJobinstance. - Throws:
Exception- if any error occurs while communicating with the driver.
-
isJobComplete
Determines whether the job has completed and all execution results are available.- Parameters:
uuid- the UUID of the jonb to check.- Returns:
trueif the job has completed,falseotherwise.- Throws:
Exception- if any error occurs while communicating with the driver.
-