Package org.jppf.node.protocol
Interface TaskBundle
- All Superinterfaces:
JPPFDistributedJob,Metadata,Serializable
- All Known Implementing Classes:
AbstractNotificationBundle,JPPFTaskBundle,NotificationBundle
Interface for job headers sent ver the network.
- Author:
- Laurent Cohen
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Make a copy of this bundle.default LongintGet the current number of tasks in this bundle.intGet the number of tasks in this bundle at the time it is received by a driver.longGet the time at which the bundle is taken out of the queue for sending to a node.intGet the initial task count of this bundle.longGet the time it took a node to execute this task.Get the uuid path of the applications (driver or client) in whose classpath the class definition may be found.booleanDetermine whether this object is used for handshake instead of execution.default booleanbooleanGet the job requeue flag.booleanGet the job requeue flag.default voidsetBundleId(Long id) voidsetCurrentTaskCount(int currentTaskCount) Set the current number of tasks in this bundle.voidsetDriverQueueTaskCount(int driverQueueTaskCount) Set the number of tasks in this bundle at the time it is received by a driver.voidsetExecutionStartTime(long executionStartTime) Set the time at which the bundle is taken out of the queue for sending to a node.voidsetHandshake(boolean handshake) Specify whether this object is used for handshake instead of execution.voidsetInitialTaskCount(int initialTaskCount) Set the initial number of tasks in this bundle.voidsetMetadata(JobMetadata jobMetadata) Set this bundle's metadata.voidSet the user-defined display name for the job.voidsetNodeExecutionTime(long nodeExecutionTime) Set the time it took a node to execute this task.voidsetRequeue(boolean requeue) Set the job requeue flag.voidGet the service level agreement between the job and the server.voidsetTaskCount(int taskCount) Set the number of tasks in this bundle.voidSet the uuid of the initial job.voidsetUuidPath(TraversalList<String> uuidPath) Set the uuid path of the applications (driver or client) in whose classpath the class definition may be found.Methods inherited from interface org.jppf.node.protocol.JPPFDistributedJob
getMetadata, getName, getSLA, getTaskCount, getUuidMethods inherited from interface org.jppf.utils.collections.Metadata
clear, getAll, getParameter, getParameter, hasParameter, removeParameter, setParameter
-
Method Details
-
getUuidPath
TraversalList<String> getUuidPath()Get the uuid path of the applications (driver or client) in whose classpath the class definition may be found.- Returns:
- the uuid path as a list of string elements.
-
setUuidPath
Set the uuid path of the applications (driver or client) in whose classpath the class definition may be found.- Parameters:
uuidPath- the uuid path as a list of string elements.
-
getNodeExecutionTime
long getNodeExecutionTime()Get the time it took a node to execute this task.- Returns:
- the time in milliseconds as a long value.
-
setNodeExecutionTime
void setNodeExecutionTime(long nodeExecutionTime) Set the time it took a node to execute this task.- Parameters:
nodeExecutionTime- the time in milliseconds as a long value.
-
setTaskCount
void setTaskCount(int taskCount) Set the number of tasks in this bundle.- Parameters:
taskCount- the number of tasks as an int.
-
setInitialTaskCount
void setInitialTaskCount(int initialTaskCount) Set the initial number of tasks in this bundle.- Parameters:
initialTaskCount- the number of tasks as an int.
-
copy
TaskBundle copy()Make a copy of this bundle.- Returns:
- a new
JPPFTaskBundleinstance.
-
getExecutionStartTime
long getExecutionStartTime()Get the time at which the bundle is taken out of the queue for sending to a node.- Returns:
- the time as a long value.
-
setExecutionStartTime
void setExecutionStartTime(long executionStartTime) Set the time at which the bundle is taken out of the queue for sending to a node.- Parameters:
executionStartTime- the time as a long value.
-
getInitialTaskCount
int getInitialTaskCount()Get the initial task count of this bundle.- Returns:
- the task count as an int.
-
setSLA
Get the service level agreement between the job and the server.- Parameters:
jobSLA- an instance ofJobSLA.
-
setName
Set the user-defined display name for the job.- Parameters:
name- the display name as a string.
-
setMetadata
Set this bundle's metadata.- Parameters:
jobMetadata- aJobMetadatainstance.
-
setUuid
Set the uuid of the initial job.- Parameters:
jobUuid- the uuid as a string.
-
getCurrentTaskCount
int getCurrentTaskCount()Get the current number of tasks in this bundle.- Returns:
- the current number of tasks as an int.
-
setCurrentTaskCount
void setCurrentTaskCount(int currentTaskCount) Set the current number of tasks in this bundle.- Parameters:
currentTaskCount- the current number of tasks as an int.
-
isPending
boolean isPending()Get the job requeue flag.- Returns:
- job requeue flag.
-
isRequeue
boolean isRequeue()Get the job requeue flag.- Returns:
- job requeue flag.
-
setRequeue
void setRequeue(boolean requeue) Set the job requeue flag.- Parameters:
requeue- job requeue flag.
-
getDriverQueueTaskCount
int getDriverQueueTaskCount()Get the number of tasks in this bundle at the time it is received by a driver.- Returns:
- the number of tasks as an int.
-
setDriverQueueTaskCount
void setDriverQueueTaskCount(int driverQueueTaskCount) Set the number of tasks in this bundle at the time it is received by a driver.- Parameters:
driverQueueTaskCount- the number of tasks as an int.
-
isHandshake
boolean isHandshake()Determine whether this object is used for handshake instead of execution.- Returns:
trueif this bundle is a handshake bundle,falseotherwise.
-
setHandshake
void setHandshake(boolean handshake) Specify whether this object is used for handshake instead of execution.- Parameters:
handshake-trueif this bundle is a handshake bundle,falseotherwise.
-
getBundleId
- Returns:
- the id of the task bundle sent to the node or local client executor.
-
setBundleId
- Parameters:
id- the id of the task bundle sent to the node or local client executor.
-
isNotification
default boolean isNotification()- Returns:
- whether this is a notification bundle.
-