public interface TaskService extends Remote
ParallelizableJobs.| Modifier and Type | Method and Description |
|---|---|
byte[] |
getClassDefinition(String name,
UUID jobId)
Gets the definition of the given class associated with the specified
job.
|
byte[] |
getClassDigest(String name,
UUID jobId)
Gets the MD5 digest for the definition of the given class associated
with the specified job.
|
BitSet |
getFinishedTasks(UUID[] jobIds,
int[] taskIds)
Determines if any of the specified tasks are no longer outstanding.
|
ca.eandb.util.rmi.Serialized<TaskWorker> |
getTaskWorker(UUID jobId)
Gets the task worker for a job.
|
void |
reportException(UUID jobId,
int taskId,
Exception e)
Report that an exception was thrown during the execution of an assigned
task.
|
TaskDescription |
requestTask()
Gets a task to perform.
|
void |
submitTaskResults(UUID jobId,
int taskId,
ca.eandb.util.rmi.Serialized<Object> results)
Submits the results of a task.
|
ca.eandb.util.rmi.Serialized<TaskWorker> getTaskWorker(UUID jobId) throws DelegationException, IllegalArgumentException, SecurityException, RemoteException
jobId - The UUID of the job to obtain the task worker
for.TaskWorker to use to process tasks for the job
with the specified UUID, or null if that
job is no longer available.DelegationException - If this JobService could not
communicate with the provider of the TaskWorker being
requested.IllegalArgumentException - If there is no job on the server with
the specified UUID.SecurityException - If the caller does not have permission to
obtain the task worker.RemoteException - If a communication error occurs.TaskDescription requestTask() throws SecurityException, RemoteException
TaskDescription describing the task to be
performed.SecurityException - If the caller does not have permission to
request tasks.RemoteException - If a communication error occurs.void submitTaskResults(UUID jobId, int taskId, ca.eandb.util.rmi.Serialized<Object> results) throws SecurityException, RemoteException
jobId - The UUID identifying the job for which the
task was performed.taskId - The ID of the task that was performed.results - The results of the task.SecurityException - If the caller does not have permission to
submit task results.RemoteException - If a communication error occurs.void reportException(UUID jobId, int taskId, Exception e) throws SecurityException, RemoteException
jobId - The UUID identifying the job for which the
task was being performed.taskId - The ID of the task that was being performed, or zero (0)
if the exception was not thrown during the processing of a task
(for example, when deserializing the TaskWorker).e - The Exception raised by the task.SecurityException - If the caller does not have permission to call
this method.RemoteException - If a problem with the connection is encountered.BitSet getFinishedTasks(UUID[] jobIds, int[] taskIds) throws IllegalArgumentException, SecurityException, RemoteException
jobIds - An array of UUID indicating the IDs of the
jobs corresponding to the tasks to check.taskIds - An array indicating the IDs of the tasks to check (must
be the same length as jobIds) If a taskId is set to
zero (0), then the corresponding bit in the result indicates if the
job is complete.BitSet indicating which tasks are no longer
outstanding. If either jobIds or taskIds
is null, an empty BitSet is returned.IllegalArgumentException - If
jobIds.length != taskIds.length.SecurityException - If the caller does not have permission to get
the completion status of tasks.RemoteException - If a communication error occurs.byte[] getClassDigest(String name, UUID jobId) throws DelegationException, SecurityException, RemoteException
name - The fully qualified name of the class whose digest to
obtain.jobId - The UUID identifying the job for which to
get the class digest.DelegationException - If this JobService could not
communicate with the provider of the class whose digest is being
requested.SecurityException - If the caller does not have permission to
obtain class digests.RemoteException - If a communication error occurs.byte[] getClassDefinition(String name, UUID jobId) throws DelegationException, SecurityException, RemoteException
name - The fully qualified name of the class whose definition to
obtain.jobId - The UUID identifying the job for which to
get the class definition.DelegationException - If this JobService could not
communicate with the provider of the class whose definition is
being requested.SecurityException - If the caller does not have permission to
obtain class definitions.RemoteException - If a communication error occurs.Copyright © 2016. All rights reserved.