|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.gridbus.broker.persistence.db.DBReader
| Constructor Summary | |
DBReader()
|
|
DBReader(java.lang.String driver,
java.lang.String connectionString,
java.lang.String username,
java.lang.String password)
Constructor specifying the JDBC driver class name to use |
|
| Method Summary | |
boolean |
connect()
Sets up the database connection |
boolean |
disconnect()
Closes the database connection |
State |
read(java.lang.Object brokerID)
Reads all the data related to the invocation of the broker with the given brokerID from storage and returns the FarmingEngine as a State object. |
State |
readBrokerInstance(java.lang.Object brokerID)
Same as the read method without an argument, but reads the instance with the given ID |
DataFile |
readDataFile(java.lang.Object datafileID,
java.lang.Object brokerID)
Reads the datafile from the store and returns a DataFile object with given ID and brokerID. |
boolean |
readDataFileHosts(java.util.Collection files,
java.util.Collection hosts,
java.lang.Object brokerID)
Reads the DataHosts and DataFiles and sets the links between them |
java.util.Collection |
readDataFiles(java.lang.Object brokerID)
Reads all the datafiles associated with the given brokerID and returns a collection of datafiles. |
DataHost |
readDataHost(java.lang.Object datahostID,
java.lang.Object brokerID)
Reads the datahost from the store and returns a DataHost object with given ID and brokerID. |
java.util.Collection |
readDataHosts(java.lang.Object brokerID)
Reads all the datahosts associated with the given brokerID and returns a collection of datahosts. |
java.lang.Object |
readEvent(java.lang.Object eventID,
java.lang.Object brokerID)
Reads the event with the given eventID from the "history" table and returns a BrokerEvent object |
java.lang.Object |
readEvents(java.lang.Object brokerID)
Reads the history of events and returns a collection of BrokerEvent objects |
Job |
readJob(java.lang.Object jobID,
java.lang.Object brokerID)
Reads the job with the given jobID and brokerID from the store, and returns a Job object |
long |
readJobCount(java.lang.Object brokerID)
|
long |
readJobCount(java.lang.Object brokerID,
int jobStatus)
|
java.util.Collection |
readJobs(java.lang.Object brokerID)
Returns the jobs collection read from the DB. |
java.util.Collection |
readJobs(java.lang.Object brokerID,
int jobStatus)
Reads jobs from the persistent storage with the given status, and returns a vector (collection) of jobs with the given brokerID |
boolean |
readJobVariables(java.util.Collection jobs,
java.util.Collection variables,
java.lang.Object brokerID)
Reads the job-variable values, and sets up the links between them. |
java.util.Vector |
readNextNJobs(java.lang.Object brokerID,
java.lang.String lastJobID,
int n)
Returns the next 'N' jobs in sequence from the persistent store, if available. |
java.util.Vector |
readNextNJobs(java.lang.Object brokerID,
java.lang.String lastJobID,
int n,
int jobStatus)
If a jobStatus of -999 is passed in, jobs with all statuses are retrieved. |
java.util.Vector |
readNextNServers(java.lang.String brokerID,
java.lang.String lastServerID,
int n)
Returns the next 'N' servers in sequence from the persistent store, if available. |
java.util.Vector |
readNextNServers(java.lang.String brokerID,
java.lang.String lastServerID,
int n,
int serverStatus)
The status -999 is used to indicate "all" servers. |
ComputeServer |
readServer(java.lang.Object serverID,
java.lang.Object brokerID)
Returns the ComputeServer record read from the DB corresponding to the given serverID and brokerID |
long |
readServerCount(java.lang.Object brokerID)
|
long |
readServerCount(java.lang.Object brokerID,
int serverStatus)
|
java.util.Collection |
readServers(java.lang.Object brokerID)
Reads all the ComputeServers associated with the given brokerID and returns a collection of servers. |
java.util.Collection |
readServers(java.lang.Object brokerID,
int serverStatus)
Reads servers from the persistent storage, and returns a vector (collection) of computeservers with the given brokerID |
Task |
readTask(java.lang.Object taskID,
java.lang.Object brokerID)
Reads the task with the given taskID and returns a Task object |
java.util.Collection |
readTasks(java.lang.Object brokerID)
Reads the tasks associated with the given brokerID |
Variable |
readVariable(java.lang.Object varID,
java.lang.Object brokerID)
|
java.util.Collection |
readVariables(java.lang.Object brokerID)
Reads the variables associated with the given brokerID |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DBReader()
throws java.lang.Exception
java.lang.Exception
public DBReader(java.lang.String driver,
java.lang.String connectionString,
java.lang.String username,
java.lang.String password)
throws java.lang.Exception
driver - connectionString - username - password -
java.lang.Exception| Method Detail |
public boolean connect()
throws java.lang.Exception
connect in interface Readerjava.lang.Exception
public boolean disconnect()
throws java.lang.Exception
disconnect in interface Readerjava.lang.Exception
public State readBrokerInstance(java.lang.Object brokerID)
throws java.lang.Exception
Reader
readBrokerInstance in interface ReaderbrokerID -
java.lang.ExceptionReader.readBrokerInstance(java.lang.Object)
public java.util.Collection readTasks(java.lang.Object brokerID)
throws java.lang.Exception
Reader
readTasks in interface ReaderbrokerID -
java.lang.Exception
public java.util.Collection readVariables(java.lang.Object brokerID)
throws java.lang.Exception
Reader
readVariables in interface ReaderbrokerID -
java.lang.ExceptionReader.readVariables(java.lang.Object)
public java.util.Collection readJobs(java.lang.Object brokerID)
throws java.lang.Exception
readJobs in interface ReaderbrokerID -
java.lang.ExceptionReader.readJobs(java.lang.Object)
public java.lang.Object readEvent(java.lang.Object eventID,
java.lang.Object brokerID)
throws java.lang.Exception
readEvent in interface ReadereventID - brokerID -
java.lang.ExceptionReader.readEvent(java.lang.Object, java.lang.Object)
public java.lang.Object readEvents(java.lang.Object brokerID)
throws java.lang.Exception
brokerID -
java.lang.Exception
public Job readJob(java.lang.Object jobID,
java.lang.Object brokerID)
throws java.lang.Exception
readJob in interface ReaderjobID - brokerID -
java.lang.ExceptionReader.readJob(java.lang.Object, java.lang.Object)
public ComputeServer readServer(java.lang.Object serverID,
java.lang.Object brokerID)
throws java.lang.Exception
readServer in interface ReaderserverID - brokerID -
java.lang.ExceptionReader.readServer(java.lang.Object, java.lang.Object)
public Variable readVariable(java.lang.Object varID,
java.lang.Object brokerID)
throws java.lang.Exception
readVariable in interface ReadervarID - brokerID -
java.lang.ExceptionReader.readVariable(java.lang.Object, java.lang.Object)
public java.util.Collection readServers(java.lang.Object brokerID)
throws java.lang.Exception
readServers in interface ReaderbrokerID -
java.lang.ExceptionReader.readServers(java.lang.Object)
public java.util.Collection readDataFiles(java.lang.Object brokerID)
throws java.lang.Exception
readDataFiles in interface ReaderbrokerID -
java.lang.ExceptionReader.readDataFiles(java.lang.Object)
public boolean readDataFileHosts(java.util.Collection files,
java.util.Collection hosts,
java.lang.Object brokerID)
throws java.lang.Exception
files - hosts - brokerID -
java.lang.Exception
public boolean readJobVariables(java.util.Collection jobs,
java.util.Collection variables,
java.lang.Object brokerID)
throws java.lang.Exception
jobs - variables - brokerID -
java.lang.Exception
public DataFile readDataFile(java.lang.Object datafileID,
java.lang.Object brokerID)
throws java.lang.Exception
readDataFile in interface ReaderdatafileID - brokerID -
java.lang.ExceptionReader.readDataFile(java.lang.Object, java.lang.Object)
public java.util.Collection readDataHosts(java.lang.Object brokerID)
throws java.lang.Exception
readDataHosts in interface ReaderbrokerID -
java.lang.ExceptionReader.readDataHosts(java.lang.Object)
public DataHost readDataHost(java.lang.Object datahostID,
java.lang.Object brokerID)
throws java.lang.Exception
readDataHost in interface ReaderdatahostID - brokerID -
java.lang.ExceptionReader.readDataHost(java.lang.Object, java.lang.Object)
public State read(java.lang.Object brokerID)
throws java.lang.Exception
Reader
read in interface ReaderbrokerID -
java.lang.ExceptionReader.read(java.lang.Object)
public Task readTask(java.lang.Object taskID,
java.lang.Object brokerID)
throws java.lang.Exception
Reader
readTask in interface ReadertaskID - brokerID -
java.lang.ExceptionReader.readTask(java.lang.Object, Object)
public long readJobCount(java.lang.Object brokerID)
throws java.lang.Exception
readJobCount in interface ReaderbrokerID -
java.lang.ExceptionReader.readJobCount(Object)
public long readJobCount(java.lang.Object brokerID,
int jobStatus)
throws java.lang.Exception
readJobCount in interface ReaderbrokerID - jobStatus -
java.lang.ExceptionReader.readJobCount(java.lang.Object, int)
public java.util.Collection readJobs(java.lang.Object brokerID,
int jobStatus)
throws java.lang.Exception
Reader
readJobs in interface ReaderbrokerID - jobStatus -
java.lang.ExceptionReader.readJobs(java.lang.Object, int)
public java.util.Collection readServers(java.lang.Object brokerID,
int serverStatus)
throws java.lang.Exception
Reader
readServers in interface ReaderbrokerID - serverStatus -
java.lang.ExceptionReader.readServers(java.lang.Object, int)
public long readServerCount(java.lang.Object brokerID)
throws java.lang.Exception
readServerCount in interface ReaderbrokerID -
java.lang.ExceptionReader.readServerCount(Object)
public long readServerCount(java.lang.Object brokerID,
int serverStatus)
throws java.lang.Exception
readServerCount in interface ReaderbrokerID - serverStatus -
java.lang.ExceptionReader.readServerCount(Object,int)
public java.util.Vector readNextNJobs(java.lang.Object brokerID,
java.lang.String lastJobID,
int n)
throws java.lang.Exception
Reader
readNextNJobs in interface ReaderbrokerID - lastJobID - (the ID of the job that was most recently retrieved). If this is null, then it starts from the first jobn -
java.lang.ExceptionReader.readNextNJobs(java.lang.Object, java.lang.String, int)
public java.util.Vector readNextNJobs(java.lang.Object brokerID,
java.lang.String lastJobID,
int n,
int jobStatus)
throws java.lang.Exception
readNextNJobs in interface ReaderbrokerID - lastJobID - (the ID of the job that was most recently retrieved). If this is null, then it starts from the first jobn - jobStatus -
java.lang.ExceptionReader.readNextNJobs(java.lang.Object, java.lang.String, int, int)
public java.util.Vector readNextNServers(java.lang.String brokerID,
java.lang.String lastServerID,
int n)
throws java.lang.Exception
Reader
readNextNServers in interface ReaderbrokerID - lastServerID - n -
java.lang.ExceptionReader.readNextNServers(java.lang.String, java.lang.String, int)
public java.util.Vector readNextNServers(java.lang.String brokerID,
java.lang.String lastServerID,
int n,
int serverStatus)
throws java.lang.Exception
readNextNServers in interface ReaderbrokerID - lastServerID - n - serverStatus -
java.lang.ExceptionReader.readNextNServers(java.lang.String, java.lang.String, int, int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||