org.quartz.spi.ThreadPool Java Examples

The following examples show how to use org.quartz.spi.ThreadPool. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DirectSchedulerFactory.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Same as
 * {@link DirectSchedulerFactory#createScheduler(ThreadPool threadPool, JobStore jobStore)},
 * with the addition of specifying the scheduler name and instance ID. This
 * scheduler can only be retrieved via
 * {@link DirectSchedulerFactory#getScheduler(String)}
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore)
    throws SchedulerException {
    createScheduler(schedulerName, schedulerInstanceId, threadPool,
            jobStore, null, 0, -1, -1);
}
 
Example #2
Source File: DirectSchedulerFactory.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool and job store and
 * binds it to RMI.
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @param rmiRegistryHost
 *          The hostname to register this scheduler with for RMI. Can use
 *          "null" if no RMI is required.
 * @param rmiRegistryPort
 *          The port for RMI. Typically 1099.
 * @param idleWaitTime
 *          The idle wait time in milliseconds. You can specify "-1" for
 *          the default value, which is currently 30000 ms.
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool,
        JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort,
        long idleWaitTime, long dbFailureRetryInterval)
    throws SchedulerException {
    createScheduler(schedulerName,
            schedulerInstanceId, threadPool,
            jobStore, null, // plugins
            rmiRegistryHost, rmiRegistryPort,
            idleWaitTime, dbFailureRetryInterval,
            DEFAULT_JMX_EXPORT, DEFAULT_JMX_OBJECTNAME);
}
 
Example #3
Source File: DirectSchedulerFactory.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool, job store, and
 * plugins, and binds it to RMI.
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @param schedulerPluginMap
 *          Map from a <code>String</code> plugin names to
 *          <code>{@link org.quartz.spi.SchedulerPlugin}</code>s.  Can use
 *          "null" if no plugins are required.
 * @param rmiRegistryHost
 *          The hostname to register this scheduler with for RMI. Can use
 *          "null" if no RMI is required.
 * @param rmiRegistryPort
 *          The port for RMI. Typically 1099.
 * @param idleWaitTime
 *          The idle wait time in milliseconds. You can specify "-1" for
 *          the default value, which is currently 30000 ms.
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool,
        JobStore jobStore, Map<String, SchedulerPlugin> schedulerPluginMap,
        String rmiRegistryHost, int rmiRegistryPort,
        long idleWaitTime, long dbFailureRetryInterval,
        boolean jmxExport, String jmxObjectName)
    throws SchedulerException {
    createScheduler(schedulerName, schedulerInstanceId, threadPool,
            DEFAULT_THREAD_EXECUTOR, jobStore, schedulerPluginMap,
            rmiRegistryHost, rmiRegistryPort, idleWaitTime,
            dbFailureRetryInterval, jmxExport, jmxObjectName);
}
 
Example #4
Source File: DirectSchedulerFactory.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool, job store, and
 * plugins, and binds it to RMI.
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param threadExecutor
 *          The thread executor for executing jobs
 * @param jobStore
 *          The type of job store
 * @param schedulerPluginMap
 *          Map from a <code>String</code> plugin names to
 *          <code>{@link org.quartz.spi.SchedulerPlugin}</code>s.  Can use
 *          "null" if no plugins are required.
 * @param rmiRegistryHost
 *          The hostname to register this scheduler with for RMI. Can use
 *          "null" if no RMI is required.
 * @param rmiRegistryPort
 *          The port for RMI. Typically 1099.
 * @param idleWaitTime
 *          The idle wait time in milliseconds. You can specify "-1" for
 *          the default value, which is currently 30000 ms.
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool,
        ThreadExecutor threadExecutor,
        JobStore jobStore, Map<String, SchedulerPlugin> schedulerPluginMap,
        String rmiRegistryHost, int rmiRegistryPort,
        long idleWaitTime, long dbFailureRetryInterval,
        boolean jmxExport, String jmxObjectName)
    throws SchedulerException {
    createScheduler(schedulerName, schedulerInstanceId, threadPool,
            DEFAULT_THREAD_EXECUTOR, jobStore, schedulerPluginMap,
            rmiRegistryHost, rmiRegistryPort, idleWaitTime,
            dbFailureRetryInterval, jmxExport, jmxObjectName, DEFAULT_BATCH_MAX_SIZE, DEFAULT_BATCH_TIME_WINDOW);
}
 
Example #5
Source File: QuartzSchedulerResources.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * <p>
 * Set the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
 * to use.
 * </p>
 * 
 * @exception IllegalArgumentException
 *              if threadPool is null.
 */
public void setThreadPool(ThreadPool threadPool) {
    if (threadPool == null) {
        throw new IllegalArgumentException("ThreadPool cannot be null.");
    }

    this.threadPool = threadPool;
}
 
Example #6
Source File: DirectSchedulerFactory.java    From AsuraFramework with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool and job store. This
 * scheduler can be retrieved via
 * {@link DirectSchedulerFactory#getScheduler()}
 *
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(ThreadPool threadPool, JobStore jobStore)
    throws SchedulerException {
    createScheduler(DEFAULT_SCHEDULER_NAME, DEFAULT_INSTANCE_ID,
            threadPool, jobStore);
    initialized = true;
}
 
Example #7
Source File: DirectSchedulerFactory.java    From AsuraFramework with Apache License 2.0 3 votes vote down vote up
/**
 * Same as
 * {@link DirectSchedulerFactory#createScheduler(ThreadPool threadPool, JobStore jobStore)},
 * with the addition of specifying the scheduler name and instance ID. This
 * scheduler can only be retrieved via
 * {@link DirectSchedulerFactory#getScheduler(String)}
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore)
    throws SchedulerException {
    createScheduler(schedulerName, schedulerInstanceId, threadPool,
            jobStore, null, 0, -1, -1);
}
 
Example #8
Source File: DirectSchedulerFactory.java    From AsuraFramework with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool and job store and
 * binds it to RMI.
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @param rmiRegistryHost
 *          The hostname to register this scheduler with for RMI. Can use
 *          "null" if no RMI is required.
 * @param rmiRegistryPort
 *          The port for RMI. Typically 1099.
 * @param idleWaitTime
 *          The idle wait time in milliseconds. You can specify "-1" for
 *          the default value, which is currently 30000 ms.
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool,
        JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort,
        long idleWaitTime, long dbFailureRetryInterval)
    throws SchedulerException {
    createScheduler(schedulerName,
            schedulerInstanceId, threadPool,
            jobStore, null, // plugins
            rmiRegistryHost, rmiRegistryPort,
            idleWaitTime, dbFailureRetryInterval,
            DEFAULT_JMX_EXPORT, DEFAULT_JMX_OBJECTNAME);
}
 
Example #9
Source File: DirectSchedulerFactory.java    From AsuraFramework with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool, job store, and
 * plugins, and binds it to RMI.
 *
 * @param schedulerName
 *          The name for the scheduler.
 * @param schedulerInstanceId
 *          The instance ID for the scheduler.
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @param schedulerPluginMap
 *          Map from a <code>String</code> plugin names to
 *          <code>{@link org.quartz.spi.SchedulerPlugin}</code>s.  Can use
 *          "null" if no plugins are required.
 * @param rmiRegistryHost
 *          The hostname to register this scheduler with for RMI. Can use
 *          "null" if no RMI is required.
 * @param rmiRegistryPort
 *          The port for RMI. Typically 1099.
 * @param idleWaitTime
 *          The idle wait time in milliseconds. You can specify "-1" for
 *          the default value, which is currently 30000 ms.
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(String schedulerName,
        String schedulerInstanceId, ThreadPool threadPool,
        JobStore jobStore, Map schedulerPluginMap,
        String rmiRegistryHost, int rmiRegistryPort,
        long idleWaitTime, long dbFailureRetryInterval,
        boolean jmxExport, String jmxObjectName)
    throws SchedulerException {
    createScheduler(schedulerName, schedulerInstanceId, threadPool,
            DEFAULT_THREAD_EXECUTOR, jobStore, schedulerPluginMap,
            rmiRegistryHost, rmiRegistryPort, idleWaitTime,
            dbFailureRetryInterval, jmxExport, jmxObjectName);
}
 
Example #10
Source File: QuartzSchedulerResources.java    From AsuraFramework with Apache License 2.0 3 votes vote down vote up
/**
 * <p>
 * Set the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
 * to use.
 * </p>
 * 
 * @exception IllegalArgumentException
 *              if threadPool is null.
 */
public void setThreadPool(ThreadPool threadPool) {
    if (threadPool == null) {
        throw new IllegalArgumentException("ThreadPool cannot be null.");
    }

    this.threadPool = threadPool;
}
 
Example #11
Source File: DirectSchedulerFactory.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a scheduler using the specified thread pool and job store. This
 * scheduler can be retrieved via
 * {@link DirectSchedulerFactory#getScheduler()}
 *
 * @param threadPool
 *          The thread pool for executing jobs
 * @param jobStore
 *          The type of job store
 * @throws SchedulerException
 *           if initialization failed
 */
public void createScheduler(ThreadPool threadPool, JobStore jobStore)
    throws SchedulerException {
    createScheduler(DEFAULT_SCHEDULER_NAME, DEFAULT_INSTANCE_ID,
            threadPool, jobStore);
}
 
Example #12
Source File: QuartzSchedulerResources.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * <p>
 * Get the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
 * to use.
 * </p>
 */
public ThreadPool getThreadPool() {
    return threadPool;
}
 
Example #13
Source File: QuartzSchedulerResources.java    From AsuraFramework with Apache License 2.0 2 votes vote down vote up
/**
 * <p>
 * Get the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
 * to use.
 * </p>
 */
public ThreadPool getThreadPool() {
    return threadPool;
}