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 |
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(RequestEndpoint<?> requestEndpoint)
Start scheduling jobs listening on the given request endpoint.
|
void shutdown()
void start(RequestEndpoint<?> requestEndpoint) 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()
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 © 2017 levigo holding gmbh. All rights reserved.