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调度器的基本目的是将请求按照它们对应在块设 ...
随机推荐
- [Android]一些设计细节
1. 图标 图标分为:Launcher 图标(程序图标),ActionBar 图标(菜单图标),Contextual 图标(嵌入的小图标)以及Notification 图标(通知栏图标).每种图标都有 ...
- 虚拟机主流软件Vmware安装
虚拟机主流软件vmware 官网:http://www.vmware.com Vmware8比较常用的稳定老版本 特点:1)不需要重新分区,只要有硬盘容量 2)模拟的操作系统可以和真正的电脑一样,可以 ...
- Digg工程师讲述Digg背后的技术
虽然最近业绩有所下滑,也出现了一些技术故障,但Digg作为首屈一指的社会化新闻网站,其背后的技术还是值得一探,Digg工程师 Dave Beckett 在今年4月份写一篇名为<How Digg ...
- Appstore 提交时错误
ERROR ITMS-9000:This boundle is invalid. New apps and app updates submitted to the App Store must ...
- EXTJS4自学手册——组合图像
Ext.create('Ext.panel.Panel', { title: '组合图像', renderTo: 'ComplexDiagram', items: [{ xtype: 'button' ...
- linux归档压缩命令
1.tar tar -cf output.tar file1.txt file2.txt .. tar -rvf output.tar fl ...
- 使用sql语句实现添加、删除约束
--主键约束(Primary Key constraint):要求主键列的数据唯一,并且不允许为空. --唯一约束(Unique Constraint):要求该列唯一,允许为空,但只能出现一个空值. ...
- 监听器如何获取Spring配置文件
我们在做项目的时候,会用到监听器去获取spring的配置文件,然后从中拿出我们需要的bean出来,比如做网站首页,假设商品的后台业务逻辑都做好了,我们需要创建一个监听器,在项目启动时将首页的数据查询出 ...
- 神技do{}while(false)
神技do{}while(false) do{}while(false)或者说do{}while(0),本人在linux源码中学得,起初看起来比较奇怪,但在处理连续流程中特别有用,例如ABC三个流程,A ...
- js获取100个随机数存入数组
. //js获取100个随机数存入数组 $(function () { var arr = []; ; var str = ""; ) { , ); ) { arr[num] = ...