public interface JobScheduler
Modifier and Type | Method and Description |
---|---|
void |
awaitFreeCapacity()
Wait for free slots for the execution of jobs.
|
void |
execute(ServerJob serverJob)
Execute the given job.
|
int |
getActiveCount()
Get the number of currently active (executing) jobs.
|
String |
getInstanceName() |
File |
getTempDir()
Get the directory to be used for temporary files for this instance.
|
TempFileReaper |
getTempFileReaper()
Get a reaper for temporary
File s |
WorkerThreadReaper |
getWorkerThreadReaper()
Get the reaper for worker
Thread s |
boolean |
isRunning()
Return whether the scheduler is running.
|
void |
notifyStateChanged(ServerJob serverJob,
Job.State state)
|
void |
setInstanceName(String requestQueueName)
The scheduler's name (used for JMX naming purposes only)
|
void |
shutdown()
Stop scheduling jobs.
|
void |
start(javax.jms.QueueConnectionFactory connectionFactory,
String queueName,
StreamTransportFactory streamProvider)
Start scheduling jobs listening on the given queue.
|
void shutdown()
void start(javax.jms.QueueConnectionFactory connectionFactory, String queueName, StreamTransportFactory streamProvider) throws Exception
Exception
void setInstanceName(String requestQueueName)
requestQueueName
- boolean isRunning()
true
iff the scheduler is runningvoid awaitFreeCapacity()
void execute(ServerJob serverJob)
serverJob
- int getActiveCount()
String getInstanceName()
File getTempDir()
WorkerThreadReaper getWorkerThreadReaper()
Thread
sWorkerThreadReaper
TempFileReaper getTempFileReaper()
File
sTempFileReaper
void notifyStateChanged(ServerJob serverJob, Job.State state)
Job.State
of a
ServerJob
has changed. No mission critical component must rely on this information.serverJob
- The job that has changed the statestate
- the new stateCopyright © 2016 levigo holding gmbh. All rights reserved.