com.parabon.client
Class SerializableTaskSpec

java.lang.Object
  extended by com.parabon.client.TaskSpec
      extended by com.parabon.client.SerializableTaskSpec

public class SerializableTaskSpec
extends TaskSpec


Nested Class Summary
 
Nested classes/interfaces inherited from class com.parabon.client.TaskSpec
TaskSpec.ExternalPackage, TaskSpec.NetworkTypeConstraint, TaskSpec.SchedulingConstraints
 
Field Summary
static java.lang.String SERIALIZABLE_ELEMENT_JAR
           
static java.lang.String SERIALIZABLE_ELEMENT_URI
           
 
Constructor Summary
SerializableTaskSpec(Job job, java.lang.String taskID)
           
 
Method Summary
 void addRequiredElement(java.net.URI uri, java.util.Map<java.lang.String,java.lang.String> metadata)
          Specify that the element referenced by this URI is required in the execution of this particular task.
 void removeRequiredElement(java.net.URI uri)
           
 void set(TaskSpec o)
          Set the current TaskSpec to be identical to that provided.
 void setParams(com.parabon.io.DataWrapper params)
          Not supported in SerializableTaskSpec.
 void setParams(java.io.File params)
          Not supported in SerializableTaskSpec.
 void setRunnableClass(java.lang.Class<? extends Task> c)
          Not supported in SerializableTaskSpec.
 void setRunnableClass(java.lang.String s)
          Not supported in SerializableTaskSpec.
 void setTask(SerializableTask task)
          Provide the SerializableTask instance which forms the basis of this task.
 
Methods inherited from class com.parabon.client.TaskSpec
addElement, addElement, addElement, addElement, addElementBundle, addElementBundle, addElementBundle, addElementBundle, addRequiredElement, addRequiredElementAsClasspathJar, addRequiredElementAsClasspathJar, addRequiredElementAsNativeLibrary, addRequiredElementAsNativeLibrary, addRequiredElementBundle, addRequiredElementBundle, addRequiredElementBundle, getElement, getElementContainer, getElementURIs, getJob, getParams, getRequiredElementMetadata, getRequiredElementURIs, getRunnableClass, getRuntimeParams, getSchedulingConstraints, getTaskID, getVisualizationURI, isBundle, removeRuntimeParam, resolveElement, setRequireNativeAccess, setRequireNetworkAccess, setRuntimeParam, setSchedulingConstraints, setVisualizationURI, validateTaskID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERIALIZABLE_ELEMENT_URI

public static final java.lang.String SERIALIZABLE_ELEMENT_URI

SERIALIZABLE_ELEMENT_JAR

public static final java.lang.String SERIALIZABLE_ELEMENT_JAR
See Also:
Constant Field Values
Constructor Detail

SerializableTaskSpec

public SerializableTaskSpec(Job job,
                            java.lang.String taskID)
Method Detail

set

public void set(TaskSpec o)
Description copied from class: TaskSpec
Set the current TaskSpec to be identical to that provided.

Overrides:
set in class TaskSpec

addRequiredElement

public void addRequiredElement(java.net.URI uri,
                               java.util.Map<java.lang.String,java.lang.String> metadata)
Description copied from class: TaskSpec
Specify that the element referenced by this URI is required in the execution of this particular task. Note that elements added directly to this task (via this TaskSpec) are not implicitly required, so a call to addRequiredElement is still needed.

Overrides:
addRequiredElement in class TaskSpec

removeRequiredElement

public void removeRequiredElement(java.net.URI uri)
Overrides:
removeRequiredElement in class TaskSpec

setRunnableClass

public void setRunnableClass(java.lang.Class<? extends Task> c)
Not supported in SerializableTaskSpec. Use setTask(com.parabon.client.SerializableTask) instead.

Overrides:
setRunnableClass in class TaskSpec
Throws:
java.lang.UnsupportedOperationException

setRunnableClass

public void setRunnableClass(java.lang.String s)
Not supported in SerializableTaskSpec. Use setTask(com.parabon.client.SerializableTask) instead.

Overrides:
setRunnableClass in class TaskSpec
Throws:
java.lang.UnsupportedOperationException
See Also:
Class

setParams

public void setParams(java.io.File params)
Not supported in SerializableTaskSpec. Use setTask(com.parabon.client.SerializableTask) instead.

Overrides:
setParams in class TaskSpec
Parameters:
params - a file containing the task's parameter data. The file provided should not be changed or removed after this method is called until the task has been either completed (when running in local or simulator mode) or fully submitted to the server (when running in remote mode) as determined by the associated TaskProxy.start() method having returned; removing it or changing its contents size during this time will result in undefined behaviour.
Throws:
java.lang.UnsupportedOperationException

setParams

public void setParams(com.parabon.io.DataWrapper params)
Not supported in SerializableTaskSpec. Use setTask(com.parabon.client.SerializableTask) instead.

Overrides:
setParams in class TaskSpec
Parameters:
params - a DataWrapper containing the task's parameter data. The referenced data sent should not be changed after this method is called; doing so will result in undefined behaviour.
Throws:
java.lang.UnsupportedOperationException

setTask

public void setTask(SerializableTask task)
             throws SerializationException
Provide the SerializableTask instance which forms the basis of this task. The task will be serialized before setTask returns, and that serialized bytestream will be used to reinstantiate the task when run. Any DataElementProxy instances referenced as part of the object graph will also be automatically marked as "required" without needing a call to addRequiredDataElement.

Throws:
SerializationException
See Also:
ElementProxy