|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.processor.DefaultWorkUnitProcessor
The default processor for work units which are received through the request and the result handler.
| Constructor Summary | |
DefaultWorkUnitProcessor()
|
|
| Method Summary | |
int |
activateWorkUnit(java.sql.Statement stmt,
WorkUnit workUnit)
Activates the specified work unit for the requested client. |
void |
checkResult(WorkUnit workUnit,
byte[] result)
Checks work units received through the result handler |
java.lang.String |
getParameters(WorkUnit workUnit)
Returns the parameters which are associated with the specified work unit; are separated by the character ',' |
WorkUnit |
getWorkUnit(int taskId,
long workUnitId,
int size)
Returns a Zeta work unit for the specified parameters. |
void |
init(ZetaServlet servlet,
java.sql.Statement stmt,
java.util.Map parameter)
Initializes the processor |
boolean |
processResult(java.sql.Statement stmt,
WorkUnit workUnit,
byte[] result,
boolean recomputation)
Processes work units received through the result handler |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultWorkUnitProcessor()
| Method Detail |
public void init(ZetaServlet servlet,
java.sql.Statement stmt,
java.util.Map parameter)
throws java.sql.SQLException
init in interface TaskProcessorservlet - surrounding servletstmt - statement object's database
java.sql.SQLException - if a database access error occurs.
public void checkResult(WorkUnit workUnit,
byte[] result)
throws java.lang.Exception
checkResult in interface TaskResultProcessorworkUnit - work unit which should be checkedresult - buffer with the zipped result
java.lang.Exception
public boolean processResult(java.sql.Statement stmt,
WorkUnit workUnit,
byte[] result,
boolean recomputation)
throws javax.servlet.ServletException,
java.sql.SQLException,
java.io.IOException
processResult in interface TaskResultProcessorstmt - statement object's databaseworkUnit - work unit which should be processedresult - buffer with the zipped resultrecomputation - if the result was recomputed
true if the ResultHandler shall save the result into the database.
java.io.IOException - if an I/O error occurs.
javax.servlet.ServletException
java.sql.SQLException
public WorkUnit getWorkUnit(int taskId,
long workUnitId,
int size)
getWorkUnit in interface TaskProcessortaskId - ID of the taskworkUnitId - ID of the work unitsize - size of the work unit
public java.lang.String getParameters(WorkUnit workUnit)
getParameters in interface TaskRequestWorkUnitProcessorworkUnit - work unit
public int activateWorkUnit(java.sql.Statement stmt,
WorkUnit workUnit)
throws javax.servlet.ServletException,
java.sql.SQLException
activateWorkUnit in interface TaskRequestWorkUnitProcessorstmt - statement object's databaseworkUnit - work unit
java.sql.SQLException - if a database access error occurs.
javax.servlet.ServletException
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||