Class QuartzSchedulerResources
- java.lang.Object
-
- org.quartz.core.QuartzSchedulerResources
-
public class QuartzSchedulerResources extends java.lang.Object
Contains all of the resources (
JobStore
,ThreadPool
, etc.) necessary to create a
instance.QuartzScheduler
- Author:
- James House
- See Also:
QuartzScheduler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CREATE_REGISTRY_ALWAYS
static java.lang.String
CREATE_REGISTRY_AS_NEEDED
static java.lang.String
CREATE_REGISTRY_NEVER
-
Constructor Summary
Constructors Constructor Description QuartzSchedulerResources()
Create an instance with no properties initialized.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for theSchedulerPlugin
to use.QuartzScheduler
static java.lang.String
generateJMXObjectName(java.lang.String schedName, java.lang.String schedInstId)
Create the name under which this scheduler should be registered in JMX.long
getBatchTimeWindow()
java.lang.String
getInstanceId()
Get the instance Id for the
.QuartzScheduler
boolean
getJMXExport()
Get whether the QuartzScheduler should be registered with the local MBeanServer.java.lang.String
getJMXObjectName()
Get the name under which the QuartzScheduler should be registered with the local MBeanServer.JobRunShellFactory
getJobRunShellFactory()
Get the
for theJobRunShellFactory
to use.QuartzScheduler
JobStore
getJobStore()
Get the
for theJobStore
to use.QuartzScheduler
boolean
getMakeSchedulerThreadDaemon()
Get whether to mark the Quartz scheduling thread as daemon.ManagementRESTServiceConfiguration
getManagementRESTServiceConfiguration()
int
getMaxBatchSize()
java.lang.String
getName()
Get the name for the
.QuartzScheduler
java.lang.String
getRMIBindName()
Get the name under which to bind the QuartzScheduler in RMI.java.lang.String
getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry, and if so, how.java.lang.String
getRMIRegistryHost()
Get the host name of the RMI Registry that the scheduler should export itself to.int
getRMIRegistryPort()
Get the port number of the RMI Registry that the scheduler should export itself to.int
getRMIServerPort()
Get the port number the scheduler server will be bound to.java.util.List<SchedulerPlugin>
getSchedulerPlugins()
ThreadExecutor
getThreadExecutor()
Get the ThreadExecutor which runs the QuartzSchedulerThreadjava.lang.String
getThreadName()
Get the name for the
.QuartzSchedulerThread
ThreadPool
getThreadPool()
Get the
for theThreadPool
to use.QuartzScheduler
java.lang.String
getUniqueIdentifier()
static java.lang.String
getUniqueIdentifier(java.lang.String schedName, java.lang.String schedInstId)
boolean
isInterruptJobsOnShutdown()
boolean
isInterruptJobsOnShutdownWithWait()
boolean
isThreadsInheritInitializersClassLoadContext()
Get whether to set the class load context of spawned threads to that of the initializing thread.void
setBatchTimeWindow(long batchTimeWindow)
void
setInstanceId(java.lang.String instanceId)
Set the name for the
.QuartzScheduler
void
setInterruptJobsOnShutdown(boolean interruptJobsOnShutdown)
void
setInterruptJobsOnShutdownWithWait(boolean interruptJobsOnShutdownWithWait)
void
setJMXExport(boolean jmxExport)
Set whether the QuartzScheduler should be registered with the local MBeanServer.void
setJMXObjectName(java.lang.String jmxObjectName)
Set the name under which the QuartzScheduler should be registered with the local MBeanServer.void
setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for theJobRunShellFactory
to use.QuartzScheduler
void
setJobStore(JobStore jobStore)
Set the
for theJobStore
to use.QuartzScheduler
void
setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Set whether to mark the Quartz scheduling thread as daemon.void
setManagementRESTServiceConfiguration(ManagementRESTServiceConfiguration managementRESTServiceConfiguration)
void
setMaxBatchSize(int maxBatchSize)
void
setName(java.lang.String name)
Set the name for the
.QuartzScheduler
void
setRMIBindName(java.lang.String rmiBindName)
Set the name under which to bind the QuartzScheduler in RMI.void
setRMICreateRegistryStrategy(java.lang.String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.void
setRMIRegistryHost(java.lang.String hostName)
Set the host name of the RMI Registry that the scheduler should export itself to.void
setRMIRegistryPort(int port)
Set the port number of the RMI Registry that the scheduler should export itself to.void
setRMIServerPort(int port)
Set the port number the scheduler server will be bound to.void
setThreadExecutor(ThreadExecutor threadExecutor)
Set the ThreadExecutor which runs the QuartzSchedulerThreadvoid
setThreadName(java.lang.String threadName)
Set the name for the
.QuartzSchedulerThread
void
setThreadPool(ThreadPool threadPool)
Set the
for theThreadPool
to use.QuartzScheduler
void
setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
Set whether to set the class load context of spawned threads to that of the initializing thread.
-
-
-
Field Detail
-
CREATE_REGISTRY_NEVER
public static final java.lang.String CREATE_REGISTRY_NEVER
- See Also:
- Constant Field Values
-
CREATE_REGISTRY_ALWAYS
public static final java.lang.String CREATE_REGISTRY_ALWAYS
- See Also:
- Constant Field Values
-
CREATE_REGISTRY_AS_NEEDED
public static final java.lang.String CREATE_REGISTRY_AS_NEEDED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name for the
.QuartzScheduler
-
setName
public void setName(java.lang.String name)
Set the name for the
.QuartzScheduler
- Throws:
java.lang.IllegalArgumentException
- if name is null or empty.
-
getInstanceId
public java.lang.String getInstanceId()
Get the instance Id for the
.QuartzScheduler
-
setInstanceId
public void setInstanceId(java.lang.String instanceId)
Set the name for the
.QuartzScheduler
- Throws:
java.lang.IllegalArgumentException
- if name is null or empty.
-
getUniqueIdentifier
public static java.lang.String getUniqueIdentifier(java.lang.String schedName, java.lang.String schedInstId)
-
getUniqueIdentifier
public java.lang.String getUniqueIdentifier()
-
getRMIRegistryHost
public java.lang.String getRMIRegistryHost()
Get the host name of the RMI Registry that the scheduler should export itself to.
-
setRMIRegistryHost
public void setRMIRegistryHost(java.lang.String hostName)
Set the host name of the RMI Registry that the scheduler should export itself to.
-
getRMIRegistryPort
public int getRMIRegistryPort()
Get the port number of the RMI Registry that the scheduler should export itself to.
-
setRMIRegistryPort
public void setRMIRegistryPort(int port)
Set the port number of the RMI Registry that the scheduler should export itself to.
-
getRMIServerPort
public int getRMIServerPort()
Get the port number the scheduler server will be bound to.
-
setRMIServerPort
public void setRMIServerPort(int port)
Set the port number the scheduler server will be bound to.
-
getRMICreateRegistryStrategy
public java.lang.String getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry, and if so, how.
-
getThreadName
public java.lang.String getThreadName()
Get the name for the
.QuartzSchedulerThread
-
setThreadName
public void setThreadName(java.lang.String threadName)
Set the name for the
.QuartzSchedulerThread
- Throws:
java.lang.IllegalArgumentException
- if name is null or empty.
-
setRMICreateRegistryStrategy
public void setRMICreateRegistryStrategy(java.lang.String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.
-
getThreadPool
public ThreadPool getThreadPool()
Get the
for theThreadPool
to use.QuartzScheduler
-
setThreadPool
public void setThreadPool(ThreadPool threadPool)
Set the
for theThreadPool
to use.QuartzScheduler
- Throws:
java.lang.IllegalArgumentException
- if threadPool is null.
-
getJobStore
public JobStore getJobStore()
Get the
for theJobStore
to use.QuartzScheduler
-
setJobStore
public void setJobStore(JobStore jobStore)
Set the
for theJobStore
to use.QuartzScheduler
- Throws:
java.lang.IllegalArgumentException
- if jobStore is null.
-
getJobRunShellFactory
public JobRunShellFactory getJobRunShellFactory()
Get the
for theJobRunShellFactory
to use.QuartzScheduler
-
setJobRunShellFactory
public void setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for theJobRunShellFactory
to use.QuartzScheduler
- Throws:
java.lang.IllegalArgumentException
- if jobRunShellFactory is null.
-
addSchedulerPlugin
public void addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for theSchedulerPlugin
to use. This method expects the plugin's "initialize" method to be invoked externally (either before or after this method is called).QuartzScheduler
-
getSchedulerPlugins
public java.util.List<SchedulerPlugin> getSchedulerPlugins()
Get the
List
of all
s for theSchedulerPlugin
to use.QuartzScheduler
-
getMakeSchedulerThreadDaemon
public boolean getMakeSchedulerThreadDaemon()
Get whether to mark the Quartz scheduling thread as daemon.- See Also:
Thread.setDaemon(boolean)
-
setMakeSchedulerThreadDaemon
public void setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Set whether to mark the Quartz scheduling thread as daemon.- See Also:
Thread.setDaemon(boolean)
-
isThreadsInheritInitializersClassLoadContext
public boolean isThreadsInheritInitializersClassLoadContext()
Get whether to set the class load context of spawned threads to that of the initializing thread.
-
setThreadsInheritInitializersClassLoadContext
public void setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
Set whether to set the class load context of spawned threads to that of the initializing thread.
-
getRMIBindName
public java.lang.String getRMIBindName()
Get the name under which to bind the QuartzScheduler in RMI. Will return the value of the uniqueIdentifier property if explict RMI bind name was never set.- See Also:
getUniqueIdentifier()
-
setRMIBindName
public void setRMIBindName(java.lang.String rmiBindName)
Set the name under which to bind the QuartzScheduler in RMI. If unset, defaults to the value of the uniqueIdentifier property.- See Also:
getUniqueIdentifier()
-
getJMXExport
public boolean getJMXExport()
Get whether the QuartzScheduler should be registered with the local MBeanServer.
-
setJMXExport
public void setJMXExport(boolean jmxExport)
Set whether the QuartzScheduler should be registered with the local MBeanServer.
-
getJMXObjectName
public java.lang.String getJMXObjectName()
Get the name under which the QuartzScheduler should be registered with the local MBeanServer. If unset, defaults to the value calculated bygenerateJMXObjectName
.- See Also:
generateJMXObjectName(String, String)
-
setJMXObjectName
public void setJMXObjectName(java.lang.String jmxObjectName)
Set the name under which the QuartzScheduler should be registered with the local MBeanServer. If unset, defaults to the value calculated bygenerateJMXObjectName
.- See Also:
generateJMXObjectName(String, String)
-
getThreadExecutor
public ThreadExecutor getThreadExecutor()
Get the ThreadExecutor which runs the QuartzSchedulerThread
-
setThreadExecutor
public void setThreadExecutor(ThreadExecutor threadExecutor)
Set the ThreadExecutor which runs the QuartzSchedulerThread
-
generateJMXObjectName
public static java.lang.String generateJMXObjectName(java.lang.String schedName, java.lang.String schedInstId)
Create the name under which this scheduler should be registered in JMX.The name is composed as: quartz:type=QuartzScheduler,name=[schedName],instance=[schedInstId]
-
getBatchTimeWindow
public long getBatchTimeWindow()
-
setBatchTimeWindow
public void setBatchTimeWindow(long batchTimeWindow)
-
getMaxBatchSize
public int getMaxBatchSize()
-
setMaxBatchSize
public void setMaxBatchSize(int maxBatchSize)
-
isInterruptJobsOnShutdown
public boolean isInterruptJobsOnShutdown()
-
setInterruptJobsOnShutdown
public void setInterruptJobsOnShutdown(boolean interruptJobsOnShutdown)
-
isInterruptJobsOnShutdownWithWait
public boolean isInterruptJobsOnShutdownWithWait()
-
setInterruptJobsOnShutdownWithWait
public void setInterruptJobsOnShutdownWithWait(boolean interruptJobsOnShutdownWithWait)
-
getManagementRESTServiceConfiguration
public ManagementRESTServiceConfiguration getManagementRESTServiceConfiguration()
-
setManagementRESTServiceConfiguration
public void setManagementRESTServiceConfiguration(ManagementRESTServiceConfiguration managementRESTServiceConfiguration)
-
-