|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.task.Task
public class Task
Constructor Summary | |
---|---|
Task(java.lang.String consumer_peer_id,
int job_id,
int bot_id,
int task_id,
byte[][] jars,
java.lang.String[] classnames,
java.lang.String main_class,
java.lang.Object[] parameters,
GridData[][] datas,
long nominal_runtime)
Constructs a new Task. |
Method Summary | |
---|---|
int |
botID()
|
java.lang.Object |
clone()
|
int |
compareTo(Task other)
Note: this class has a natural ordering that is inconsistent with equals (see comment here below). |
java.lang.String |
consumerID()
|
void |
deleteMeatada()
Strips the Task from now-unuseful payload, such as metada, output, ... |
boolean |
equals(java.lang.Object obj)
|
void |
flagAsCancelled(java.lang.String supplier_peer_id)
|
void |
flagAsCompleted(java.lang.String supplier_peer_id,
long start_time,
GridData data,
byte[] logs,
int power)
|
void |
flagAsPreempted()
|
int |
getCancellationCount()
|
GridData[] |
getInputDataSet()
Returns readied data's. |
java.lang.String |
getInputDataSetID()
|
long |
getInputDataSetSize()
|
MetaGridData[] |
getInputMetaGridDataSet()
|
int |
getPreemptionCount()
|
GridData[][] |
getRawInputDataSet()
|
int |
getSupplyingSpaceBoTID()
|
int |
getSupplyingSpaceJobID()
|
int |
hashCode()
|
int |
id()
|
java.lang.Object[] |
inputParameters()
|
boolean |
isCompleted()
|
byte[][] |
jars()
|
int |
jobID()
|
java.lang.Integer |
jobIDAsKey()
|
java.lang.String |
mainClass()
|
java.lang.String[] |
names()
|
long |
nominalRuntime()
|
TaskOutput |
output()
|
GridData[] |
readyInputDataSet(GridDataManager gdm)
Readies input data set for execution. |
void |
setStartTime()
|
void |
setSupplyingSpaceBoTID(int tmp_bot_id)
|
void |
setSupplyingSpaceJobID(int tmp_job_id)
|
void |
syncWith(Task returning_self)
|
java.lang.Integer |
taskIDAsKey()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Task(java.lang.String consumer_peer_id, int job_id, int bot_id, int task_id, byte[][] jars, java.lang.String[] classnames, java.lang.String main_class, java.lang.Object[] parameters, GridData[][] datas, long nominal_runtime) throws GridException
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Task other)
Note: this class has a natural ordering that is inconsistent with equals (see comment here below).
It is hypothesized that 2 Tasks from different BoTs will *never* be compared. As this method is called very frequently, the implementation of compareTo() skips the comparison of BoT id, relying only on the comparison of Task id.
compareTo
in interface java.lang.Comparable<Task>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String consumerID()
public int jobID()
public java.lang.Integer jobIDAsKey()
public int botID()
public int id()
public java.lang.Integer taskIDAsKey()
public byte[][] jars()
public java.lang.String[] names()
public java.lang.Object[] inputParameters()
public java.lang.String mainClass()
public long nominalRuntime()
public void setSupplyingSpaceJobID(int tmp_job_id) throws GridException
GridException
public int getSupplyingSpaceJobID()
public void setSupplyingSpaceBoTID(int tmp_bot_id) throws GridException
GridException
public int getSupplyingSpaceBoTID()
public GridData[][] getRawInputDataSet() throws GridException
GridException
public MetaGridData[] getInputMetaGridDataSet() throws GridException
GridException
public java.lang.String getInputDataSetID()
public long getInputDataSetSize()
public GridData[] readyInputDataSet(GridDataManager gdm) throws GridException
GridException
- If all data's cannot be downloadedpublic GridData[] getInputDataSet() throws GridException
GridException
readyInputDataSet(lbg.protocol.data.GridDataManager)
public void setStartTime() throws GridException
GridException
public void flagAsCompleted(java.lang.String supplier_peer_id, long start_time, GridData data, byte[] logs, int power) throws GridException
GridException
public boolean isCompleted()
public TaskOutput output() throws GridException
GridException
public void flagAsCancelled(java.lang.String supplier_peer_id) throws GridException
GridException
public int getCancellationCount()
public void flagAsPreempted()
public int getPreemptionCount()
public void syncWith(Task returning_self) throws GridException
GridException
public void deleteMeatada() throws GridException
This is a transitional method: will become unneeded when .jar files and output data files are integrated into the data transfer architecture.
GridException
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.