|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.server.JobCache
This class implements an in-memory cache that stores job information. It can help decrease the time required to retrieve information about jobs so that they are retrieved from memory rather than the configuration directory.
| Constructor Summary | |
JobCache(ConfigHandler configHandler,
int cacheSize)
Creates a new job cache intended to hold information about the specified number of jobs. |
|
| Method Summary | |
void |
addJob(Job job)
Adds the specified information to the job cache. |
void |
addOptimizingJob(OptimizingJob optimizingJob)
Adds the specified optimizing job to the cache. |
void |
deleteJob(java.lang.String jobID)
Removes the information about the specified job from the job cache. |
void |
deleteOptimizingJob(java.lang.String optimizingJobID)
Removes the information about the specified optimizing job from the job cache. |
void |
flush()
Removes all information stored in this job cache. |
Job |
getJob(java.lang.String jobID)
Retrieves the specified job. |
Job[] |
getJobs()
Retrieves the set of jobs that are currently held in the cache, in order of least recently used to most recently used. |
OptimizingJob |
getOptimizingJob(java.lang.String optimizingJobID)
Retrieves the specified optimizing job. |
OptimizingJob[] |
getOptimizingJobs()
Retrieves the set of optimizing jobs that are currently held in the cache, in order of least recently used to most recently used. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JobCache(ConfigHandler configHandler,
int cacheSize)
configHandler - The reference to the configuration handler to use to
retrieve the job data if a requested job is not
contained in the cache.cacheSize - The maximum number of jobs that can be stored in the
cache.| Method Detail |
public Job getJob(java.lang.String jobID)
throws SLAMDServerException
jobID - The job ID of the job to retrieve.
null if it was not in the
job cache or the configuration directory.
SLAMDServerException - If it is necessary to retrieve the job
information from the configuration directory
and a problem occurs while doing so.public Job[] getJobs()
public OptimizingJob getOptimizingJob(java.lang.String optimizingJobID)
throws SLAMDServerException
optimizingJobID - The job ID of the optimizing job to retrieve.
null if it was not
in the job cache or the configuration directory.
SLAMDServerException - If it is necessary to retrieve the job
information from the configuration directory
and a problem occurs while doing so.public OptimizingJob[] getOptimizingJobs()
public void addJob(Job job)
job - The job to be added to the cache.public void addOptimizingJob(OptimizingJob optimizingJob)
optimizingJob - The optimizing job to be added to the cache.public void deleteJob(java.lang.String jobID)
jobID - The ID of the job to be removed from the cache.public void deleteOptimizingJob(java.lang.String optimizingJobID)
optimizingJobID - The ID of the optimizing job to be removed from
the cache.public void flush()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||