ScheduleFactory(不同scheduler name)
package com.unis.uvm.quartz; import java.util.Properties; import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory; /**
* Scheduler Factory: used to create a scheduler
*
* @author xpz
* @version [version, Nov 17, 2014]
* @see [about class/method]
* @since [product/module version]
*/
public class ScheduleFactory {
private static Scheduler scheduler = null; private ScheduleFactory() {
} /***
* get scheduler instance
*
* @return [explain parameter]
* @return Scheduler [explain return type]
* @throws SchedulerException
* @exception throws [exception type] [explain exception]
* @see [class,class#method,class#member]
*/
public static Scheduler getScheduler(String threadName)
throws SchedulerException {
if (scheduler == null) {
StdSchedulerFactory sf = new StdSchedulerFactory(
"quartz.properties");
Properties pros = new Properties();
pros.put("org.quartz.scheduler.instanceName", threadName);
pros.put("org.quartz.threadPool.threadCount", "10");
sf.initialize(pros);
scheduler = sf.getScheduler();
}
return scheduler;
}
}
ScheduleFactory(不同scheduler name)的更多相关文章
- AndroidStudio3.0无法打开Android Device Monitor的解决办法(An error has occurred on Android Device Monitor)
---恢复内容开始--- 打开monitor时出现 An error has occurred. See the log file... ------------------------------- ...
- 从scheduler is shutted down看程序员的英文水平
我有个windows服务程序,今天重点在测试系统逻辑.部署后,在看系统日志时,不经意看到一行:scheduler is shutted down. 2016-12-29 09:40:24.175 {& ...
- Spring 4 + Quartz 2.2.1 Scheduler Integration Example
In this post we will see how to schedule Jobs using Quartz Scheduler with Spring. Spring provides co ...
- VMware中CPU分配不合理以及License限制引起的SQL Scheduler不能用于查询处理
有一台SQL Server(SQL Server 2014 标准版)服务器中的scheduler_count与cpu_count不一致,如下截图所示: SELECT cpu_count , ...
- Windows Task Scheduler Fails With Error Code 2147943785
Problem: Windows Task Scheduler Fails With Error Code 2147943785 Solution: This is usually due to a ...
- Fair Scheduler 队列设置经验总结
Fair Scheduler 队列设置经验总结 由于公司的hadoop集群的计算资源不是很充足,需要开启yarn资源队列的资源抢占.在使用过程中,才明白资源抢占的一些特点.在这里总结一下. 只有一个队 ...
- Fair Scheduler中的Delay Schedule分析
延迟调度的主要目的是提高数据本地性(data locality),减少数据在网络中的传输.对于那些输入数据不在本地的MapTask,调度器将会延迟调度他们,而把slot分配给那些具备本地性的MapTa ...
- 【Cocos2d-x 3.x】 调度器Scheduler类源码分析
非个人的全部理解,部分摘自cocos官网教程,感谢cocos官网. 在<CCScheduler.h>头文件中,定义了关于调度器的五个类:Timer,TimerTargetSelector, ...
- Linux IO Scheduler(Linux IO 调度器)
每个块设备或者块设备的分区,都对应有自身的请求队列(request_queue),而每个请求队列都可以选择一个I/O调度器来协调所递交的request.I/O调度器的基本目的是将请求按照它们对应在块设 ...
随机推荐
- S6:组合模式 Composite
将对象组合成树形结构以表示整体-部分的层次结构,组合模式使得用户对单个对象和组合对象的使用具有一致性. UML: 示例代码:透明组合:叶节点和子节点具有相同的接口 abstract class Com ...
- Asp.Net北大青鸟总结(五)-数据绑定控件
在前面的博客我已经介绍了关于一个特殊控件也是我们经经常使用到的控件gridview的使用实现真假分页.这也是属于绑定控件的一种使用.那么我们接下来来介绍一下数据绑定这门技术吧! 一.数据绑定 ...
- ODOO Unable To Find Wkhtmltopdf On This System. Error/Bug ?
If you are using ODOO version 8 and getting some error like – Unable to find Wkhtmltopdf on this sys ...
- hdu1509(Windows Message Queue) 优先队列
点击打开链接 Problem Description Message queue is the basic fundamental of windows system. For each proces ...
- struts2 接口如何接收客户端提交的json数据
struts2 接口如何接收客户端提交的json数据 CreationTime--2018年6月20日15点54分 Author:Marydon 1.情景还原 使用struts2写的接口(服务端) ...
- 阿里云dataworks数据工场用户使用子账号
如果您是第一次使用子账号登录数加平台和使用DataWorks,您需要获知以下内容: 该子账号所属主账号的企业别名. 该子账号的用户名和密码. 该子账号的AccessKey ID和AccessKey S ...
- CREATE SEQUENCE添加自增序列及NEXT VALUE FOR返回序列号
From :https://msdn.microsoft.com/zh-cn/library/ff878091.aspx 语法: CREATE SEQUENCE [schema_name . ] se ...
- linux中的dd复制命令
dd命令用于复制文件并对原文件的内容进行转换和格式化处理.dd命令功能很强大的,对于一些比较底层的问题,使用dd命令往往可以得到出人意料的效果.用的比较多的还是用dd来备份裸设备.但是不推荐,如果需要 ...
- altera tcl
例子:https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/n ...
- C++语言基础(19)-模板的显式具体化
应用背景: 例如有下面的函数模板,它用来获取两个变量中较大的一个: template<class T> const T& Max(const T& a, const T&a ...