K - the type of the keys used to identify and locate jobs in the persistence store.public interface JobPersistence<K>
The state of a job is essentially made of the tasks initially submitted, associated with the list of tasks that completed.
The underlying physical store that is used is implementation-dependent. For example: file system, database, cloud storage facility, etc.
| Modifier and Type | Method and Description |
|---|---|
Collection<K> |
allKeys()
Get the keys of all jobs in the persistence store.
|
void |
close()
Close this store and release any used resources.
|
K |
computeKey(JPPFJob job)
Compute the key for the specified job.
|
void |
deleteJob(K key)
Delete the job with the specified key from the persistence store.
|
JPPFJob |
loadJob(K key)
Load a job from the persistence store given its key.
|
void |
storeJob(K key,
JPPFJob job,
List<org.jppf.node.protocol.Task<?>> tasks)
Store the specified tasks of the specified job with the specified key.
|
K computeKey(JPPFJob job)
job - the job for which to get a key.Collection<K> allKeys() throws JobPersistenceException
JobPersistenceException - if any error occurs while retrieving the keys.JPPFJob loadJob(K key) throws JobPersistenceException
key - the key allowing to locate the job in the persistence store.JobPersistenceException - if any error occurs while loading the job.void storeJob(K key, JPPFJob job, List<org.jppf.node.protocol.Task<?>> tasks) throws JobPersistenceException
key - the key allowing to locate the job in the persistence store.job - the job to store.tasks - the newly received completed tasks, may be used to only store the delta for better performance.JobPersistenceException - if any error occurs while storing the job.void deleteJob(K key) throws JobPersistenceException
key - the key allowing to locate the job in the persistence store.JobPersistenceException - if any error occurs while deleting the job.void close()
Copyright © 2005-2019 JPPF Team.