|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.server.protocol.JPPFTaskBundle
public class JPPFTaskBundle
Instances of this class group tasks from the same client together, so they are sent to the same node,
avoiding unnecessary transport overhead.
The goal is to provide a performance enhancement through an adaptive bundling of tasks originating from the same client.
The bundle size is computed dynamically, depending on the number of nodes connected to the server, and other factors.
| Nested Class Summary | |
|---|---|
static class |
JPPFTaskBundle.State
Type safe enumeration for the values of the bundle state. |
| Constructor Summary | |
|---|---|
JPPFTaskBundle()
Initialize this task bundle and set its build number. |
|
| Method Summary | |
|---|---|
int |
compareTo(JPPFTaskBundle bundle)
Compare two task bundles, based on their respective priorities. |
JPPFTaskBundle |
copy()
Make a copy of this bundle. |
JPPFTaskBundle |
copy(int nbTasks)
Make a copy of this bundle containing only the first nbTasks tasks it contains. |
int |
getBuildNumber()
Get the build number under which this task bundle was created. |
String |
getBundleUuid()
Get the unique identifier for this task bundle. |
TaskCompletionListener |
getCompletionListener()
Get the task completion listener to notify, once the execution of this task has completed. |
byte[] |
getDataProvider()
Get shared data provider for this task. |
long |
getExecutionStartTime()
Get the time at which the bundle is taken out of the queue for sending to a node. |
String |
getId()
Get the user-defined display name for this job. |
int |
getInitialTaskCount()
Get the initial task count of this bundle. |
JPPFJobMetadata |
getJobMetadata()
Get the user-defined metadata asoociated with this job. |
JPPFJobSLA |
getJobSLA()
Get the service level agreement between the job and the server. |
String |
getJobUuid()
Get the universal unique id for this job. |
long |
getNodeExecutionTime()
Get the time it took a node to execute this task. |
Object |
getParameter(Object name)
Get the value of a parameter of this request. |
Object |
getParameter(Object name,
Object defaultValue)
Get the value of a parameter of this request. |
Map<Object,Object> |
getParametersMap()
Get the map holding the parameters of the request. |
long |
getQueueEntryTime()
Get the time at which this wrapper was added to the queue. |
String |
getRequestUuid()
Get the unique identifier for the request this task is a part of. |
JPPFTaskBundle.State |
getState()
Get the state of this bundle. |
int |
getTaskCount()
Get the number of tasks in this bundle. |
List<byte[]> |
getTasks()
Get the tasks to be executed by the node. |
TraversalList<String> |
getUuidPath()
Get the uuid path of the applications (driver or client) in whose classpath the class definition may be found. |
Object |
removeParameter(Object name)
Remove a parameter from this request. |
void |
setBundleUuid(String uuid)
Set the unique identifier for this task bundle. |
void |
setCompletionListener(TaskCompletionListener listener)
Set the task completion listener to notify, once the execution of this task has completed. |
void |
setDataProvider(byte[] dataProvider)
Set shared data provider for this task. |
void |
setExecutionStartTime(long executionStartTime)
Set the time at which the bundle is taken out of the queue for sending to a node. |
void |
setJobSLA(JPPFJobSLA jobSLA)
Get the service level agreement between the job and the server. |
void |
setNodeExecutionTime(long nodeExecutionTime)
Set the time it took a node to execute this task. |
void |
setParameter(Object name,
Object value)
Set a parameter of this request. |
void |
setQueueEntryTime(long queueEntryTime)
Set the time at which this wrapper was added to the queue. |
void |
setRequestUuid(String requestUuid)
Set the unique identifier for the request this task is a part of. |
void |
setState(JPPFTaskBundle.State state)
Set the state of this bundle. |
void |
setTaskCount(int taskCount)
Set the number of tasks in this bundle. |
void |
setTasks(List<byte[]> tasks)
Set the tasks to be executed by the node. |
void |
setUuidPath(TraversalList<String> uuidPath)
Set the uuid path of the applications (driver or client) in whose classpath the class definition may be found. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JPPFTaskBundle()
| Method Detail |
|---|
public String getBundleUuid()
public void setBundleUuid(String uuid)
uuid - the uuid as a string.public String getRequestUuid()
public void setRequestUuid(String requestUuid)
requestUuid - the request uuid as a string.public byte[] getDataProvider()
DataProvider instance.public void setDataProvider(byte[] dataProvider)
dataProvider - a DataProvider instance.public TraversalList<String> getUuidPath()
public void setUuidPath(TraversalList<String> uuidPath)
uuidPath - the uuid path as a list of string elements.public long getQueueEntryTime()
public void setQueueEntryTime(long queueEntryTime)
queueEntryTime - the time as a long value.public long getNodeExecutionTime()
public void setNodeExecutionTime(long nodeExecutionTime)
nodeExecutionTime - the time in milliseconds as a long value.public List<byte[]> getTasks()
List of arrays of bytes.public void setTasks(List<byte[]> tasks)
tasks - the tasks as a List of arrays of bytes.public int getTaskCount()
public void setTaskCount(int taskCount)
taskCount - the number of tasks as an int.public TaskCompletionListener getCompletionListener()
TaskCompletionListener instance.public void setCompletionListener(TaskCompletionListener listener)
listener - a TaskCompletionListener instance.public int compareTo(JPPFTaskBundle bundle)
compareTo in interface Comparable<JPPFTaskBundle>bundle - the bundle compare this one to.
Comparable.compareTo(java.lang.Object)public int getBuildNumber()
public JPPFTaskBundle copy()
JPPFTaskBundle instance.public JPPFTaskBundle copy(int nbTasks)
nbTasks - the number of tasks to include in the copy.
JPPFTaskBundle instance.public JPPFTaskBundle.State getState()
State type safe enumeration value.public void setState(JPPFTaskBundle.State state)
state - a State type safe enumeration value.public long getExecutionStartTime()
public void setExecutionStartTime(long executionStartTime)
executionStartTime - the time as a long value.public int getInitialTaskCount()
public void setParameter(Object name,
Object value)
name - the name of the parameter to set.value - the value of the parameter to set.public Object getParameter(Object name)
name - the name of the parameter to get.
public Object getParameter(Object name,
Object defaultValue)
name - the name of the parameter to get.defaultValue - the default value to return if the parameter is not set.
defaultValue if the parameter is not set.public Object removeParameter(Object name)
name - the name of the parameter to remove.
public Map<Object,Object> getParametersMap()
public JPPFJobSLA getJobSLA()
getJobSLA in interface JPPFDistributedJobJPPFJobSLA.public void setJobSLA(JPPFJobSLA jobSLA)
jobSLA - an instance of JPPFJobSLA.public String toString()
toString in class Objectpublic String getId()
getId in interface JPPFDistributedJobpublic JPPFJobMetadata getJobMetadata()
getJobMetadata in interface JPPFDistributedJobJPPFJobMetadata instance.public String getJobUuid()
getJobUuid in interface JPPFDistributedJob
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||