Package org.jppf.node.protocol
Class JobCommonSLA<T extends JobCommonSLA<T>>
java.lang.Object
org.jppf.node.protocol.JobCommonSLA<T>
- Type Parameters:
T- the type of SLA.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JobClientSLA,JobSLA
This interface represents the Service Level Agreement between a JPPF job and a server.
It determines the state, conditions and order in which a job will be executed.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TCreate a copy of this job SLA.Get the tasks execution policy.Get the job expiration schedule configuration.Get the job schedule.intGet the maximum number of tasks allowed in a dispatch of the job.Get the preference policy.for this job SLA.booleanDetermine whether to allow multiple concurrent dispatches of the job to the same driver (client-side SLA) or to the same node (server-side SLA).setAllowMultipleDispatchesToSameChannel(boolean allowMultipleDispatchesToSameChannel) Specifiy whether to allow multiple concurrent dispatches of the job to the same driver (client-side SLA) or to the same node (server-side SLA).setExecutionPolicy(ExecutionPolicy executionPolicy) Set the tasks execution policy.setJobExpirationSchedule(JPPFSchedule jobExpirationSchedule) Set the job expiration schedule configuration.setJobSchedule(JPPFSchedule jobSchedule) Set the job schedule.setMaxDispatchSize(int maxDispatchSize) Set the maximum number of tasks allowed in a dispatch of the job.setPreferencePolicy(Preference preferencePolicy) Set the preference policy for this job SLA.
-
Constructor Details
-
JobCommonSLA
public JobCommonSLA()Default constructor.
-
-
Method Details
-
getExecutionPolicy
Get the tasks execution policy.- Returns:
- an
ExecutionPolicyinstance.
-
setExecutionPolicy
Set the tasks execution policy.- Parameters:
executionPolicy- anExecutionPolicyinstance.- Returns:
- this SLA, for method call chaining.
-
getJobSchedule
Get the job schedule.- Returns:
- a
JPPFScheduleinstance.
-
setJobSchedule
Set the job schedule.- Parameters:
jobSchedule- aJPPFScheduleinstance.- Returns:
- this SLA, for method call chaining.
-
getJobExpirationSchedule
Get the job expiration schedule configuration.- Returns:
- a
JPPFScheduleinstance.
-
setJobExpirationSchedule
Set the job expiration schedule configuration.- Parameters:
jobExpirationSchedule- aJPPFScheduleinstance.- Returns:
- this SLA, for method call chaining.
-
copyTo
Create a copy of this job SLA.- Parameters:
sla- aJobCommonSLAinto which to copy the attributes of this instance.- Returns:
- a
JobCommonSLAinstance.
-
getMaxDispatchSize
public int getMaxDispatchSize()Get the maximum number of tasks allowed in a dispatch of the job. This value will override the one computed by the load-balancer whenmaxDispatchSize < loadBalancerSize.By default, when
setMaxDispatchSize(int)has not yet been called, this method will returnInteger.MAX_VALUE.- Returns:
- the maximum number of of tasks allowed in a job dispatch.
- Since:
- 6.1
-
setMaxDispatchSize
Set the maximum number of tasks allowed in a dispatch of the job.- Parameters:
maxDispatchSize- the maximum dispatch size to set. Values less than or equal to 0 are ignored and have no effect.- Returns:
- this SLA, for method call chaining.
- Since:
- 6.1
-
isAllowMultipleDispatchesToSameChannel
public boolean isAllowMultipleDispatchesToSameChannel()Determine whether to allow multiple concurrent dispatches of the job to the same driver (client-side SLA) or to the same node (server-side SLA).- Returns:
true(the default) if multiple dispatches of the job can be sent to the same channel,falseotherwise.- Since:
- 6.1
-
setAllowMultipleDispatchesToSameChannel
Specifiy whether to allow multiple concurrent dispatches of the job to the same driver (client-side SLA) or to the same node (server-side SLA).- Parameters:
allowMultipleDispatchesToSameChannel-trueto allow multiple dispatches of the job to be sent to the same channel,falseotherwise.- Returns:
- this SLA, for method call chaining.
- Since:
- 6.1
-
getPreferencePolicy
Get the preference policy.for this job SLA.- Returns:
- a
Preferencepolicy instance, ornullif it was notset. - Since:
- 6.1
-
setPreferencePolicy
Set the preference policy for this job SLA.- Parameters:
preferencePolicy- aPreferencepolicy instance, which may benull- Returns:
- this SLA, for method call chaining.
- Since:
- 6.1
-