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调度器的基本目的是将请求按照它们对应在块设 ...
随机推荐
- 怎样在caffe中添加layer以及caffe中triplet loss layer的实现
关于triplet loss的原理.目标函数和梯度推导在上一篇博客中已经讲过了.详细见:triplet loss原理以及梯度推导.这篇博文主要是讲caffe下实现triplet loss.编程菜鸟.假 ...
- MyEclipse中快捷键
------------------------------------- MyEclipse 快捷键1(CTRL) ------------------------------------- Ctr ...
- Spark Streaming揭秘 Day2-五大核心特征
Spark Streaming揭秘 Day2 五大核心特征 引子 书接上回,Streaming更像Spark上的一个应用程序,会有多个Job的配合,是最复杂的Spark应用程序.让我们先从特征角度进行 ...
- 警惕rapidxml的陷阱(二):在Android上默认内存池分配数组过大,容易导致栈溢出
上一篇随笔中提到了,rapidxml在每个xml对象中维护了一个内存池,自己管理变量的生存周期.看起来很好,但我们在实际使用中还是出现了问题. 项目中我们的模块很快写好了,在windows和linux ...
- angularJS 中的two-way data binding.
原文: https://stackoverflow.com/questions/11616636/how-to-do-two-way-filtering-in-angularjs ---------- ...
- Netty源码细节IO线程(EventLoop)(转)
原文:http://budairenqin.iteye.com/blog/2215896 源码来自Netty5.x版本, 本系列文章不打算从架构的角度去讨论netty, 只想从源码细节展开, 又不想通 ...
- REOBJECT structure
REOBJECT structure 包含丰富编辑控件中的OLE或图像对象的信息. Syntax 语法 typedef struct _reobject { DWORD cbStruct; LON ...
- ant-design table 分页(tableProps)
1.布局 <Table dataSource={this.state.tableDetailList} scroll={{ y: '200px' }} style={{tableLayout: ...
- Gperftools中tcmalloc的简介和使用(转)
TcMalloc(Thread-CachingMalloc)是google-perftools工具中的一个内存管理库,与标准的glibc库中malloc相比,TcMalloc在内存分配的效率和速度上要 ...
- 【Java】Java_12 Eclipse
1.eclipse简介 Eclipse 是一个开放源代码的.基于Java的可扩展开发平台.就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境. 尽管 Eclipse 是使用Java语 ...