public class QuartzSchedulerResources extends Object
Contains all of the resources (JobStore
,ThreadPool
,
etc.) necessary to create a
instance.
QuartzScheduler
QuartzScheduler
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_REGISTRY_ALWAYS |
static String |
CREATE_REGISTRY_AS_NEEDED |
static String |
CREATE_REGISTRY_NEVER |
Constructor and Description |
---|
QuartzSchedulerResources()
Create an instance with no properties initialized.
|
Modifier and Type | Method and Description |
---|---|
void |
addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for the
to use. |
static String |
generateJMXObjectName(String schedName,
String schedInstId)
Create the name under which this scheduler should be registered in JMX.
|
long |
getBatchTimeWindow() |
String |
getInstanceId()
Get the instance Id for the
. |
boolean |
getJMXExport()
Get whether the QuartzScheduler should be registered with the local
MBeanServer.
|
String |
getJMXObjectName()
Get the name under which the QuartzScheduler should be registered with
the local MBeanServer.
|
JobRunShellFactory |
getJobRunShellFactory()
Get the
for the
to use. |
JobStore |
getJobStore()
Get the
for the
to use. |
boolean |
getMakeSchedulerThreadDaemon()
Get whether to mark the Quartz scheduling thread as daemon.
|
ManagementRESTServiceConfiguration |
getManagementRESTServiceConfiguration() |
int |
getMaxBatchSize() |
String |
getName()
Get the name for the
. |
String |
getRMIBindName()
Get the name under which to bind the QuartzScheduler in RMI.
|
String |
getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry,
and if so, how.
|
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.
|
List<SchedulerPlugin> |
getSchedulerPlugins()
|
ThreadExecutor |
getThreadExecutor()
Get the ThreadExecutor which runs the QuartzSchedulerThread
|
String |
getThreadName()
Get the name for the
. |
ThreadPool |
getThreadPool()
Get the
for the
to use. |
String |
getUniqueIdentifier() |
static String |
getUniqueIdentifier(String schedName,
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(String instanceId)
Set the name for the
. |
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(String jmxObjectName)
Set the name under which the QuartzScheduler should be registered with
the local MBeanServer.
|
void |
setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for the
to use. |
void |
setJobStore(JobStore jobStore)
Set the
for the
to use. |
void |
setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Set whether to mark the Quartz scheduling thread as daemon.
|
void |
setManagementRESTServiceConfiguration(ManagementRESTServiceConfiguration managementRESTServiceConfiguration) |
void |
setMaxBatchSize(int maxBatchSize) |
void |
setName(String name)
Set the name for the
. |
void |
setRMIBindName(String rmiBindName)
Set the name under which to bind the QuartzScheduler in RMI.
|
void |
setRMICreateRegistryStrategy(String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.
|
void |
setRMIRegistryHost(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 QuartzSchedulerThread
|
void |
setThreadName(String threadName)
Set the name for the
. |
void |
setThreadPool(ThreadPool threadPool)
Set the
for the
to use. |
void |
setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
Set whether to set the class load context of spawned threads to that
of the initializing thread.
|
public static final String CREATE_REGISTRY_NEVER
public static final String CREATE_REGISTRY_ALWAYS
public static final String CREATE_REGISTRY_AS_NEEDED
public QuartzSchedulerResources()
Create an instance with no properties initialized.
public String getName()
Get the name for the
.
QuartzScheduler
public void setName(String name)
Set the name for the
.
QuartzScheduler
IllegalArgumentException
- if name is null or empty.public String getInstanceId()
Get the instance Id for the
.
QuartzScheduler
public void setInstanceId(String instanceId)
Set the name for the
.
QuartzScheduler
IllegalArgumentException
- if name is null or empty.public String getUniqueIdentifier()
public String getRMIRegistryHost()
Get the host name of the RMI Registry that the scheduler should export itself to.
public void setRMIRegistryHost(String hostName)
Set the host name of the RMI Registry that the scheduler should export itself to.
public int getRMIRegistryPort()
Get the port number of the RMI Registry that the scheduler should export itself to.
public void setRMIRegistryPort(int port)
Set the port number of the RMI Registry that the scheduler should export itself to.
public int getRMIServerPort()
Get the port number the scheduler server will be bound to.
public void setRMIServerPort(int port)
Set the port number the scheduler server will be bound to.
public String getRMICreateRegistryStrategy()
Get the setting of whether or not Quartz should create an RMI Registry, and if so, how.
public String getThreadName()
Get the name for the
.
QuartzSchedulerThread
public void setThreadName(String threadName)
Set the name for the
.
QuartzSchedulerThread
IllegalArgumentException
- if name is null or empty.public void setRMICreateRegistryStrategy(String rmiCreateRegistryStrategy)
Set whether or not Quartz should create an RMI Registry, and if so, how.
public ThreadPool getThreadPool()
Get the
for the ThreadPool
to use.
QuartzScheduler
public void setThreadPool(ThreadPool threadPool)
Set the
for the ThreadPool
to use.
QuartzScheduler
IllegalArgumentException
- if threadPool is null.public JobStore getJobStore()
Get the
for the JobStore
to use.
QuartzScheduler
public void setJobStore(JobStore jobStore)
Set the
for the JobStore
to use.
QuartzScheduler
IllegalArgumentException
- if jobStore is null.public JobRunShellFactory getJobRunShellFactory()
Get the
for the JobRunShellFactory
to use.
QuartzScheduler
public void setJobRunShellFactory(JobRunShellFactory jobRunShellFactory)
Set the
for the JobRunShellFactory
to use.
QuartzScheduler
IllegalArgumentException
- if jobRunShellFactory is null.public void addSchedulerPlugin(SchedulerPlugin plugin)
Add the given
for the
SchedulerPlugin
to use. This method expects the plugin's
"initialize" method to be invoked externally (either before or after
this method is called).
QuartzScheduler
public List<SchedulerPlugin> getSchedulerPlugins()
Get the List
of all
s for the
SchedulerPlugin
to use.
QuartzScheduler
public boolean getMakeSchedulerThreadDaemon()
Thread.setDaemon(boolean)
public void setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon)
Thread.setDaemon(boolean)
public boolean isThreadsInheritInitializersClassLoadContext()
public void setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
public String getRMIBindName()
getUniqueIdentifier()
public void setRMIBindName(String rmiBindName)
getUniqueIdentifier()
public boolean getJMXExport()
public void setJMXExport(boolean jmxExport)
public String getJMXObjectName()
generateJMXObjectName.
generateJMXObjectName(String, String)
public void setJMXObjectName(String jmxObjectName)
generateJMXObjectName.
generateJMXObjectName(String, String)
public ThreadExecutor getThreadExecutor()
public void setThreadExecutor(ThreadExecutor threadExecutor)
public static String generateJMXObjectName(String schedName, String schedInstId)
The name is composed as: quartz:type=QuartzScheduler,name=[schedName],instance=[schedInstId]
public long getBatchTimeWindow()
public void setBatchTimeWindow(long batchTimeWindow)
public int getMaxBatchSize()
public void setMaxBatchSize(int maxBatchSize)
public boolean isInterruptJobsOnShutdown()
public void setInterruptJobsOnShutdown(boolean interruptJobsOnShutdown)
public boolean isInterruptJobsOnShutdownWithWait()
public void setInterruptJobsOnShutdownWithWait(boolean interruptJobsOnShutdownWithWait)
public ManagementRESTServiceConfiguration getManagementRESTServiceConfiguration()
public void setManagementRESTServiceConfiguration(ManagementRESTServiceConfiguration managementRESTServiceConfiguration)
Copyright 2001-2019, Terracotta, Inc.