|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.persistence.db.DBReader
public final class 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 |
GridbusFarmingEngine |
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. |
GridbusFarmingEngine |
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)
|
long |
readJobCount(java.lang.String brokerID,
int status,
java.lang.String serverID)
|
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 |
java.util.Vector |
readJobs(java.lang.Object brokerID,
int pageNumber,
int pageSize,
int jobStatus)
Reads a page of jobs with the given status. |
java.util.Vector |
readNextNJobs(java.lang.Object brokerID,
int n)
Reads and returns 'n' jobs from the persistent store. |
java.util.Vector |
readNextNJobs(java.lang.Object brokerID,
int n,
int jobStatus)
If a jobStatus of Job.ALL is passed in, jobs with all statuses are retrieved. |
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 |
| 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 GridbusFarmingEngine readBrokerInstance(java.lang.Object brokerID)
throws java.lang.Exception
Reader
readBrokerInstance in interface Readerjava.lang.ExceptionReader.readBrokerInstance(java.lang.Object)
public java.util.Collection readJobs(java.lang.Object brokerID)
throws java.lang.Exception
readJobs in interface Readerjava.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 Readerjava.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 Readerjava.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 Readerjava.lang.ExceptionReader.readServer(java.lang.Object, java.lang.Object)
public java.util.Collection readServers(java.lang.Object brokerID)
throws java.lang.Exception
readServers in interface Readerjava.lang.ExceptionReader.readServers(java.lang.Object)
public java.util.Collection readDataFiles(java.lang.Object brokerID)
throws java.lang.Exception
readDataFiles in interface Readerjava.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 DataFile readDataFile(java.lang.Object datafileID,
java.lang.Object brokerID)
throws java.lang.Exception
readDataFile in interface Readerjava.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 Readerjava.lang.ExceptionReader.readDataHosts(java.lang.Object)
public DataHost readDataHost(java.lang.Object datahostID,
java.lang.Object brokerID)
throws java.lang.Exception
readDataHost in interface Readerjava.lang.ExceptionReader.readDataHost(java.lang.Object, java.lang.Object)
public GridbusFarmingEngine read(java.lang.Object brokerID)
throws java.lang.Exception
Reader
read in interface Readerjava.lang.ExceptionReader.read(java.lang.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 Readerjava.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 Readerjava.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 Readerjava.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 Readerjava.lang.ExceptionReader.readServerCount(Object,int)
public java.util.Vector readNextNJobs(java.lang.Object brokerID,
int n)
throws java.lang.Exception
readNextNJobs in interface Readerjava.lang.ExceptionReader.readNextNJobs(java.lang.Object, int)
public java.util.Vector readNextNJobs(java.lang.Object brokerID,
int n,
int jobStatus)
throws java.lang.Exception
readNextNJobs in interface Readerjava.lang.Exceptionorg.gridbus.broker.persistence.Reader#readNextNJobs(java.lang.Object, java.lang.String, int, int)
public long readJobCount(java.lang.String brokerID,
int status,
java.lang.String serverID)
throws java.lang.Exception
readJobCount in interface Readerjava.lang.Exceptionorg.gridbus.broker.persistence.Reader#readJobCount(java.lang.String, int, org.gridbus.broker.farming.common.ComputeServer)
public java.util.Vector readJobs(java.lang.Object brokerID,
int pageNumber,
int pageSize,
int jobStatus)
throws java.lang.Exception
Reader
readJobs in interface Readerjava.lang.ExceptionReader.readJobs(java.lang.Object, int, int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||