|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuws.job.SerializableUWSObject
uws.service.AbstractUWS<JobList<J>,J>
uws.service.BasicUWS<J>
uws.service.QueuedBasicUWS<J>
public class QueuedBasicUWS<J extends AbstractJob>
A BasicUWS which is able to manage an execution queue.
In this implementation the size of the queue is limited by a number given at the initialization.
Thus a job can run in this UWS only if there are less running jobs than the given number.
Note: The limitation of the queue size is only one possible queue management way !
If you want to test other conditions before running a job, you must change the used execution manager by using the method
AbstractUWS.setExecutionManager(ExecutionManager) with the appropriate implementation
of the interface ExecutionManager.
BasicUWS,
QueuedExecutionManager,
Serialized Form| Field Summary |
|---|
| Fields inherited from class uws.service.BasicUWS |
|---|
constructor, jobClass |
| Fields inherited from class uws.service.AbstractUWS |
|---|
choosenSerializer, defaultSerializer, description, executedAction, homePage, homeRedirection, mapJobLists, name, reInitUrlInterpreter, serializers, urlInterpreter, userIdentifier, uwsActions |
| Constructor Summary | |
|---|---|
QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs)
Builds a QueuedBasicUWS. |
|
QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs,
java.lang.String baseURI)
Builds a QueuedBasicUWS. |
|
QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs,
UWSUrl urlInterpreter)
Builds a QueuedBasicUWS. |
|
| Method Summary | |
|---|---|
int |
getMaxRunningJobs()
Gets the maximum number of jobs that can run in the same time. |
void |
setMaxRunningJobs(int maxRunningJobs)
Sets the maximum number of jobs that can run in the same time. |
| Methods inherited from class uws.service.BasicUWS |
|---|
createJob, getConstructor |
| Methods inherited from class uws.job.SerializableUWSObject |
|---|
serialize, serialize, serialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs)
throws UWSException
cl - The class object of the type of job to manage.nbMaxRunningJobs - The maximum number of jobs that can run in the same time (that is to say: the size of the execution queue).
UWSException - BasicUWS.BasicUWS(Class),
QueuedExecutionManager.QueuedExecutionManager(int),
AbstractUWS.setExecutionManager(uws.job.manager.ExecutionManager)
public QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs,
java.lang.String baseURI)
throws UWSException
cl - The class object of the type of job to manage.nbMaxRunningJobs - The maximum number of jobs that can run in the same time (that is to say: the size of the execution queue).baseURI - The base UWS URI.
UWSException - BasicUWS.BasicUWS(Class, String),
QueuedExecutionManager.QueuedExecutionManager(int),
AbstractUWS.setExecutionManager(uws.job.manager.ExecutionManager)
public QueuedBasicUWS(java.lang.Class<J> cl,
int nbMaxRunningJobs,
UWSUrl urlInterpreter)
throws UWSException
cl - The class object of the type of job to manage.nbMaxRunningJobs - The maximum number of jobs that can run in the same time (that is to say: the size of the execution queue).urlInterpreter - The UWS URL interpreter to use in this UWS.
UWSException - BasicUWS.BasicUWS(Class, UWSUrl),
QueuedExecutionManager.QueuedExecutionManager(int),
AbstractUWS.setExecutionManager(uws.job.manager.ExecutionManager)| Method Detail |
|---|
public final int getMaxRunningJobs()
Gets the maximum number of jobs that can run in the same time.
Note: This method does nothing if the used execution manager is not subclass of QueuedExecutionManager.
QueuedExecutionManager.QueuedExecutionManager.getMaxRunningJobs()
public final void setMaxRunningJobs(int maxRunningJobs)
throws UWSException
Sets the maximum number of jobs that can run in the same time.
Note: This method does nothing if the used execution manager is not subclass of QueuedExecutionManager.
maxRunningJobs - The new maximum number of running jobs (must be > 0 to have a queue).
UWSException - If there is an error while updating the list of running jobs (in other words if some queued jobs can not be executed).QueuedExecutionManager.setMaxRunningJobs(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||