|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uws.job.SerializableUWSObject uws.service.AbstractUWS<JobList<AbstractJob>,AbstractJob> uws.service.ExtendedUWS uws.service.QueuedExtendedUWS
public class QueuedExtendedUWS
A ExtendedUWS
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
.
ExtendedUWS
,
QueuedExecutionManager
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class uws.service.ExtendedUWS |
---|
ExtendedUWS.AddJobWithConstructor |
Field Summary |
---|
Fields inherited from class uws.service.ExtendedUWS |
---|
assocJobListClass, assocJobListConstructor, jlDestination |
Fields inherited from class uws.service.AbstractUWS |
---|
choosenSerializer, defaultSerializer, description, executedAction, homePage, homeRedirection, mapJobLists, name, reInitUrlInterpreter, serializers, urlInterpreter, userIdentifier, uwsActions |
Constructor Summary | |
---|---|
QueuedExtendedUWS(int nbMaxRunningJobs)
Builds a QueuedExtendedUWS. |
|
QueuedExtendedUWS(int nbMaxRunningJobs,
java.lang.String baseURI)
Builds a QueuedExtendedUWS with its base URI. |
|
QueuedExtendedUWS(int nbMaxRunningJobs,
UWSUrl urlInterpreter)
Builds a QueuedExtendedUWS with the UWS URL interpreter to use. |
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.ExtendedUWS |
---|
addConstructor, addJobList, createJob, destroyJobList, getConstructor, removeJobList |
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 QueuedExtendedUWS(int nbMaxRunningJobs) throws UWSException
nbMaxRunningJobs
- The maximum number of jobs that can run in the same time (that is to say: the size of the execution queue).
UWSException
- If there is an error when calling the constructor super()
or if the given maximum number of running jobs is negative or null.ExtendedUWS.ExtendedUWS()
,
QueuedExecutionManager.QueuedExecutionManager(int)
,
AbstractUWS.setExecutionManager(uws.job.manager.ExecutionManager)
public QueuedExtendedUWS(int nbMaxRunningJobs, java.lang.String baseURI) throws UWSException
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
- If there is an error when calling the constructor super(String)
or if the given maximum number of running jobs is negative or null.ExtendedUWS.ExtendedUWS(String)
,
QueuedExecutionManager.QueuedExecutionManager(int)
,
AbstractUWS.setExecutionManager(uws.job.manager.ExecutionManager)
public QueuedExtendedUWS(int nbMaxRunningJobs, UWSUrl urlInterpreter) throws UWSException
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 this UWS must use.
UWSException
- If there is an error when calling the constructor super(UWSUrl)
of if the given maximum number of running jobs is negative or null.ExtendedUWS.ExtendedUWS(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 |