|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.gridbus.broker.persistence.ActiveSet
The ActiveSet class is used to work with a subset of jobs / servers in the current broker instance. This class retrieves all the info from persistent storage and hence depends on the persistence provider for its functioning. The reader is assumed to return jobs in a sequence order by jobID/serverID. Internally it keeps a pointer (i.e stores the jobID/serverID), of the last retrieved job/server, when retrieving the jobs/servers sequentially (forward-only). Jobs/Servers can be retrieved in a forward-only manner. This pointer is updated whenever a getNextN* method is called. The pointer is *NOT* updated when any other method is called. (such as the getAll* methods).
| Constructor Summary | |
ActiveSet(Writer writer,
Reader reader)
The Constructor of the ActiveSet class expects to receive a properly set up writer and reader objects, which are ready to use. |
|
| Method Summary | |
java.util.Collection |
getAllJobs()
Returns a collection of all the jobs in the current broker instance. |
java.util.Collection |
getAllJobs(int jobStatus)
Returns a collection of all the jobs in the current broker instance. |
java.util.Collection |
getAllServers()
Returns a collection of all the servers in the current broker instance. |
java.util.Collection |
getAllServers(int serverStatus)
Returns a collection of all the servers in the current broker instance. |
long |
getJobCount(int jobStatus)
Returns the total number of jobs with the given status |
java.util.Collection |
getNextNJobs(int N)
Gets the next "N" jobs available from the persistent store, This method sequentially goes through the jobs in the database, starting from the first. |
java.util.Collection |
getNextNJobs(int N,
int jobStatus)
Gets the next "N" jobs available from the persistent store, with the given status |
java.util.Collection |
getNextNServers(int N)
Gets the next "N" servers available from the persistent store, This method sequentially goes through the servers in the database, starting from the first. |
java.util.Collection |
getNextNServers(int N,
int serverStatus)
Gets the next "N" servers available from the persistent store, with the given status If no servers are found, an empty collection is returned. |
long |
getServerCount(int serverStatus)
Returns the number of servers with the given status |
long |
getTotalJobCount()
Returns the total number of jobs |
long |
getTotalServerCount()
Returns the total number of servers |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ActiveSet(Writer writer,
Reader reader)
writer - reader - | Method Detail |
public java.util.Collection getAllJobs()
public long getTotalJobCount()
public long getJobCount(int jobStatus)
jobStatus -
public java.util.Collection getAllJobs(int jobStatus)
jobStatus -
public java.util.Collection getNextNJobs(int N)
N -
public java.util.Collection getNextNJobs(int N,
int jobStatus)
N - jobStatus -
public java.util.Collection getAllServers()
public long getTotalServerCount()
public long getServerCount(int serverStatus)
serverStatus -
public java.util.Collection getAllServers(int serverStatus)
serverStatus -
public java.util.Collection getNextNServers(int N)
N -
public java.util.Collection getNextNServers(int N,
int serverStatus)
N - serverStatus -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||