public class InMemoryJobSchedulerStore extends ServiceSupport implements JobSchedulerStore
Constructor and Description |
---|
InMemoryJobSchedulerStore() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop(ServiceStopper stopper) |
File |
getDirectory()
Gets the location where the Job Scheduler will write the persistent data used
to preserve and recover scheduled Jobs.
|
JobScheduler |
getJobScheduler(String name)
Returns the JobScheduler instance identified by the given name.
|
boolean |
removeJobScheduler(String name)
Removes the named JobScheduler if it exists, purging all scheduled messages
assigned to it.
|
void |
setDirectory(File directory)
Sets the directory where persistent store data will be written.
|
long |
size()
The size of the current store on disk if the store utilizes a disk based store
mechanism.
|
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
public InMemoryJobSchedulerStore()
protected void doStop(ServiceStopper stopper) throws Exception
doStop
in class ServiceSupport
Exception
protected void doStart() throws Exception
doStart
in class ServiceSupport
Exception
public JobScheduler getJobScheduler(String name) throws Exception
JobSchedulerStore
getJobScheduler
in interface JobSchedulerStore
name
- the name of the JobScheduler instance to lookup.Exception
- if an error occurs while loading the named scheduler.public boolean removeJobScheduler(String name) throws Exception
JobSchedulerStore
removeJobScheduler
in interface JobSchedulerStore
name
- the name of the scheduler instance to remove.Exception
- if an error occurs while removing the scheduler.public long size()
JobSchedulerStore
size
in interface JobSchedulerStore
public File getDirectory()
JobSchedulerStore
getDirectory
in interface JobSchedulerStore
public void setDirectory(File directory)
JobSchedulerStore
setDirectory
in interface JobSchedulerStore
directory
- The directory where the job scheduler store is to be located.Copyright © 2005–2018 FuseSource, Corp.. All rights reserved.