org.gridbus.broker.persistence
Class State
java.lang.Object
|
+--org.gridbus.broker.farming.common.FarmingEngine
|
+--org.gridbus.broker.farming.common.GridbusFarmingEngine
|
+--org.gridbus.broker.persistence.State
- public class State
- extends GridbusFarmingEngine
The State class represents the current state of the broker. It extends the farming engine
and is primarily used with the persistence functions.
The State object is passed as a parameter to the "store" method of the farming engine.
The store method itself could be called by any function that wants to store the state of the broker
at any particular time. Some of the situations when the farming engine could be "stored" are
when certain "interesting" events occur. Some such events would be:
- broker initialisation complete (after setting up jobs and servers)
- broker starting scheduling (beginning to start scheduling)
- job status change (ready,executing,done,failed etc)
- server status change (dead, alive, busy etc)
- scheduler completing the current poll
- all jobs executed (hence broker application is completed).
- Author:
- krishna
|
Constructor Summary |
State(GridbusFarmingEngine fe)
Represents a State object (which is a snapshot of the entire farming engine at
some instance of time. |
State(java.lang.String brokerID)
Create a new farmingEngine using this constructor. |
| Methods inherited from class org.gridbus.broker.farming.common.GridbusFarmingEngine |
getAppDescriptionFile, getBrokerID, getBudget, getCurrentState, getDataFileList, getDataHostTable, getDeadline, getJobCount, getJobs, getLocalDirectory, getNextNJobs, getNextNJobs, getResourceDescriptionFile, getScheduler, getStartDateStamp, getStats, getTempDirectory, getTotalJobCount, getUsername, init, initJobs, initResources, isFeasible, isInputDataFilePresent, isSchedulingComplete, isSchedulingFailed, isSchedulingFinished, schedule, setAppDescriptionFile, setBudget, setDataFileList, setDataHostTable, setDeadline, setFeasible, setLocalDirectory, setResourceDescriptionFile, setScheduler, setStartDateStamp, setTempDirectory, setUsername, store, storeJobs, storeServers, terminate, terminateJob |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
STARTED
public static final int STARTED
- See Also:
- Constant Field Values
COMPLETED
public static final int COMPLETED
- See Also:
- Constant Field Values
State
public State(java.lang.String brokerID)
throws GridBrokerException
- Create a new farmingEngine using this constructor.
This is used during only the "recovery" process.
To get the current state, always use the farming engine.getCurrentState()
- Parameters:
brokerID -
- Throws:
GridBrokerException
State
public State(GridbusFarmingEngine fe)
throws GridBrokerException
- Represents a State object (which is a snapshot of the entire farming engine at
some instance of time.
This constructor is meant to be used only when the current state of the fe is to
be frozen for saving to persistent storage for example.
- Parameters:
fe -
- Throws:
GridBrokerException
getStatus
public int getStatus()
- Returns:
- Returns the status.
setStatus
public void setStatus(int status)
- Parameters:
status - The status to set.
getStatusString
public java.lang.String getStatusString()
- Returns:
setStatusString
public void setStatusString(java.lang.String status)
- Parameters:
status -
getLastUpdateStamp
public java.util.Date getLastUpdateStamp()
- Returns:
- Returns the lastUpdateStamp.