|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.persistence.ActiveSet
public class 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(java.lang.Object config)
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. |
long |
getJobCount(int jobStatus)
Returns the total number of jobs with the given status |
long |
getJobCount(int status,
java.lang.String serverID)
|
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 |
Reader |
getReader()
|
long |
getServerCount(int serverStatus)
Returns the number of servers with the given status |
java.util.Collection |
getServers()
Returns a collection of all the servers in the current broker instance. |
long |
getTotalJobCount()
Returns the total number of jobs |
long |
getTotalServerCount()
Returns the total number of servers |
Writer |
getWriter()
|
void |
setServers(java.util.Vector servers)
|
void |
storeJob(Job j)
|
void |
storeJobs(java.util.Vector jobs)
|
void |
storeServers(java.util.Vector servers)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActiveSet(java.lang.Object config)
config - | Method Detail |
|---|
public Writer getWriter()
public Reader getReader()
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 getServers()
public long getTotalServerCount()
public long getServerCount(int serverStatus)
serverStatus -
public void setServers(java.util.Vector servers)
servers - public void storeServers(java.util.Vector servers)
servers - public void storeJobs(java.util.Vector jobs)
jobs - public void storeJob(Job j)
j -
public long getJobCount(int status,
java.lang.String serverID)
status - serverID -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||