com.gigaspaces.grid.master
Interface Job

All Superinterfaces:
java.io.Serializable

public interface Job
extends java.io.Serializable

A job is a piece of computation intended for parallel mode execution and split into task objects.


Method Summary
 Identity getIdentity()
          Get the universally unique identifier for job.
 JobDescriptor getJobDescriptor()
          Get the JobDescriptor for the Job
 int getTotalTasks()
          Get total amount of tasks the Job can be divided across
 JobResult process(net.jini.space.JavaSpace space, net.jini.core.transaction.Transaction txn, boolean batch)
          Process the Job
 void setArguments(java.lang.Object[] args)
          Provide an arguments for job
 Task[] split()
          The implementation of Job should specify how to divide this job into tasks.
 

Method Detail

process

JobResult process(net.jini.space.JavaSpace space,
                  net.jini.core.transaction.Transaction txn,
                  boolean batch)
                  throws JobException
Process the Job

Parameters:
space - A reference to a JavaSpace service, must not be null
txn - An optional reference to a Transaction
batch - Whether or not the Job can be run in batch mode
Returns:
A JobResult resulting from processing the Job
Throws:
JobException - If errors occur processing the Job, throw a general Exception

split

Task[] split()
The implementation of Job should specify how to divide this job into tasks.

Returns:
An array of generated Task objects. If the Job is not dividable, return a zero-length array

setArguments

void setArguments(java.lang.Object[] args)
Provide an arguments for job

Parameters:
args - An array of String arguments the Job will process. Must not be null

getIdentity

Identity getIdentity()
Get the universally unique identifier for job.

Returns:
The Identity property of the Job

getTotalTasks

int getTotalTasks()
Get total amount of tasks the Job can be divided across


getJobDescriptor

JobDescriptor getJobDescriptor()
Get the JobDescriptor for the Job



Copyright (c) 2007 GigaSpaces Technologies, Inc.
All Rights Reserved.