|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.parabon.client.Job
com.parabon.client.RemoteJob
public class RemoteJob
| Nested Class Summary | |
|---|---|
protected class |
RemoteJob.Establisher
|
| Nested classes/interfaces inherited from class com.parabon.client.Job |
|---|
Job.JobConstraints, Job.TaskProxyIterator, Job.TaskProxySet, Job.WeakTaskReference |
| Constructor Summary | |
|---|---|
RemoteJob(RemoteSessionManager manager_,
java.lang.String jobID_,
java.util.Map<java.lang.String,java.lang.String> attributes_,
com.parabon.util.ObjectPool pool_,
boolean isOriginator_)
|
|
RemoteJob(RemoteSessionManager manager_,
java.lang.String jobID_,
java.util.Map<java.lang.String,java.lang.String> attributes_,
com.parabon.util.ObjectPool pool_,
boolean isOriginator_,
Job.JobConstraints constraints)
|
|
| Method Summary | |
|---|---|
java.net.URI |
addElement(java.lang.String identifier,
com.parabon.io.DataWrapper contents)
Create a job-level element with the given identifier which can be referred to in tasks contained in this job. |
java.net.URI |
addElementBundle(java.lang.String identifier,
com.parabon.io.DataWrapper contents)
Create a job-level element bundle containing elements which can be referred to in tasks contained in this job. |
void |
consumeContentsMessage(com.parabon.message.sp.ContentsMessage message)
|
void |
consumeTaskMessage(com.parabon.message.sp.TaskMessage m)
|
void |
consumeTaskStatusMessage(com.parabon.message.sp.TaskStatusMessage m)
|
java.lang.String |
createTaskID()
Returns a valid task ID unique within this Job |
protected com.parabon.client.TaskMaster |
createTaskMaster(TaskSpec spec,
java.util.Map<java.lang.String,java.lang.String> taskAttributes)
|
java.util.Set<TaskProxy> |
findRemoteTasksByAttribute(java.util.Map<java.lang.String,java.lang.String> template,
int blockMillis)
Search for tasks with attributes matching the given template. |
java.lang.String |
getLaunchToken()
|
protected com.parabon.client.RemoteTaskMaster |
getOrCreateTaskMaster(java.lang.String taskID,
java.util.Map<java.lang.String,java.lang.String> attributes,
boolean updateAttributes)
|
protected void |
notifyListenersChanged()
|
void |
reestablish()
Equivalent to reestablish(-1). |
void |
reestablish(int blockMillis)
Request that the list of tasks contained in this job be reestablished if possible from a remote repository. |
void |
reestablish(com.parabon.util.Listener completionListener)
Similar to reestablish(int), but does not block,
instead calling the Listener.alert() method of the
given listener when and if results are obtained. |
void |
reestablishPartial(java.util.Map<java.lang.String,java.lang.String> template,
com.parabon.util.Listener completionListener)
Similar to reestablish(Listener
completionListener), but reestablishes at a minimum only
those tasks matching the given template (as defined in
findTasksByAttribute()). |
void |
remove()
Destroy this job and all tasks it contains, removing all references to it locally and remotely. |
void |
setLaunchToken(java.lang.String value)
|
protected void |
setManager(SessionManager sm)
|
protected void |
stopJob()
|
protected void |
updateAttach()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteJob(RemoteSessionManager manager_,
java.lang.String jobID_,
java.util.Map<java.lang.String,java.lang.String> attributes_,
com.parabon.util.ObjectPool pool_,
boolean isOriginator_)
public RemoteJob(RemoteSessionManager manager_,
java.lang.String jobID_,
java.util.Map<java.lang.String,java.lang.String> attributes_,
com.parabon.util.ObjectPool pool_,
boolean isOriginator_,
Job.JobConstraints constraints)
| Method Detail |
|---|
public void setLaunchToken(java.lang.String value)
public java.lang.String getLaunchToken()
protected void setManager(SessionManager sm)
setManager in class Jobpublic void remove()
Job
remove in class Job
public java.net.URI addElement(java.lang.String identifier,
com.parabon.io.DataWrapper contents)
JobMethod may or may not block until data is sent.
addElement in class Jobidentifier - the globally unique identifier to be associated with the new
element, formed using the provided string. Should be unique within
this job; if a data element with this identifier already exists on the
server, behavior will be undefined.contents - the data to be associated with the new element
public java.net.URI addElementBundle(java.lang.String identifier,
com.parabon.io.DataWrapper contents)
JobMethod may or may not block until data is sent.
addElementBundle in class Jobidentifier - the globally unique identifier to be associated with the new
element, formed using the provided string. Should be unique within
this job; if a data element with this identifier already exists on the
server, behavior will be undefined.contents - the data to be associated with the new elements. The data must
be in Parabon Element Bundle format, including a valid
bundle manifest.
protected com.parabon.client.TaskMaster createTaskMaster(TaskSpec spec,
java.util.Map<java.lang.String,java.lang.String> taskAttributes)
createTaskMaster in class Job
public java.util.Set<TaskProxy> findRemoteTasksByAttribute(java.util.Map<java.lang.String,java.lang.String> template,
int blockMillis)
throws TimeoutException
JobSearches all tasks, whether released or not, employing a remote repository (the Frontier server) if applicable.
findRemoteTasksByAttribute in class JobSet of TaskProxys
corresponding to the tasks matching the given template
TimeoutException
public void reestablishPartial(java.util.Map<java.lang.String,java.lang.String> template,
com.parabon.util.Listener completionListener)
Jobreestablish(Listener
completionListener), but reestablishes at a minimum only
those tasks matching the given template (as defined in
findTasksByAttribute()).
reestablishPartial in class JobJob.findTasksByAttribute(Map),
Job.reestablish(Listener)public void reestablish()
Jobreestablish(-1).
reestablish in class JobJob.reestablish(int)
public void reestablish(int blockMillis)
throws TimeoutException
Job
Blocks a maximum of approximately the specified number of
milliseconds. If results are not obtained within the specitied
timeout, a TimeoutException will be thrown.
If blockMillis == -1, will block indefinitely.
Note that this method should never be called with a negative or large block timeout from within an event listener or any other method which must complete in order for further events to be processed, as this would lead to a possible deadlock.
reestablish in class JobTimeoutExceptionpublic void reestablish(com.parabon.util.Listener completionListener)
Jobreestablish(int), but does not block,
instead calling the Listener.alert() method of the
given listener when and if results are obtained.
reestablish in class JobJob.reestablish(int)public java.lang.String createTaskID()
Job
createTaskID in class Jobprotected void notifyListenersChanged()
notifyListenersChanged in class Jobprotected void updateAttach()
protected void stopJob()
stopJob in class Job
protected com.parabon.client.RemoteTaskMaster getOrCreateTaskMaster(java.lang.String taskID,
java.util.Map<java.lang.String,java.lang.String> attributes,
boolean updateAttributes)
public void consumeTaskStatusMessage(com.parabon.message.sp.TaskStatusMessage m)
public void consumeTaskMessage(com.parabon.message.sp.TaskMessage m)
public void consumeContentsMessage(com.parabon.message.sp.ContentsMessage message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||