Package org.jppf.node.protocol
Class PersistenceSpec
java.lang.Object
org.jppf.node.protocol.PersistenceSpec
- All Implemented Interfaces:
Serializable
This class defines whether a job should be persisted and the behavior of the persistence facility upon recovery.
- Since:
- 6.0
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether the driver should automatically execute the persisted job after a restart.booleanDetermine whether the persisted job should be deleted from the persistence store when it terminates.booleanDetermine whether the job is persisted in the driver.setAutoExecuteOnRestart(boolean autoExecuteOnRestart) Specify whether the driver should automatically execute the persisted job after a restart.setDeleteOnCompletion(boolean deleteOnCompletion) Determine whether the persisted job should be deleted from the persistence store when it terminates.setPersistent(boolean persistent) Specify whether the job is persisted in the driver.
-
Constructor Details
-
PersistenceSpec
public PersistenceSpec()
-
-
Method Details
-
isPersistent
public boolean isPersistent()Determine whether the job is persisted in the driver. The default value of this attribute isfalse.- Returns:
trueif the job is persisted,falseotherwise.
-
setPersistent
Specify whether the job is persisted in the driver.- Parameters:
persistent-trueif the job is to be persisted,falseotherwise.- Returns:
- this
PersistenceSpecinstance, for method call chaining.
-
isAutoExecuteOnRestart
public boolean isAutoExecuteOnRestart()Determine whether the driver should automatically execute the persisted job after a restart. The default value of this attribute isfalse.- Returns:
trueif the job is automatically executed upon recovery,falseotherwise.
-
setAutoExecuteOnRestart
Specify whether the driver should automatically execute the persisted job after a restart.- Parameters:
autoExecuteOnRestart-trueif the job is to be automatically executed upon recovery,falseotherwise.- Returns:
- this
PersistenceSpecinstance, for method call chaining.
-
isDeleteOnCompletion
public boolean isDeleteOnCompletion()Determine whether the persisted job should be deleted from the persistence store when it terminates. The default value of this attribute istrue.- Returns:
trueif the job should be deleted from persistence,falseotherwise.
-
setDeleteOnCompletion
Determine whether the persisted job should be deleted from the persistence store when it terminates.- Parameters:
deleteOnCompletion-trueif the job should be deleted from persistence,falseotherwise.- Returns:
- this
PersistenceSpecinstance, for method call chaining.
-