- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/gresrun/jesque
- 软件文档: https://github.com/gresrun/jesque
软件介绍
jesque 是 Resque 的Java语言实现版。
使用示例:
// Configuration
final Config config = new ConfigBuilder().build();
// Add a job to the queue
final Job job = new Job("TestAction",
new Object[]{ 1, 2.3, true, "test", Arrays.asList("inner", 4.5)});
final Client client = new ClientImpl(config);
client.enqueue("foo", job);
client.end();
// Add a job to the delayed queue
final Job job = new Job("TestAction",
new Object[]{ 1, 2.3, true, "test", Arrays.asList("inner", 4.5)});
final long delay = 10; // in seconds
final long future = System.currentTimeMillis() + (delay * 1000); // timestamp
final Client client = new ClientImpl(config);
client.delayedEnqueue("fooDelay", job, future);
client.end();
// Start a worker to run jobs from the queue
final Worker worker = new WorkerImpl(config,
Arrays.asList("foo"), new MapBasedJobFactory(map(entry("TestAction", TestAction.class))));
final Thread workerThread = new Thread(worker);
workerThread.start();
// Wait a few secs then shutdown
try { Thread.sleep((delay * 1000) + 5000); } catch (Exception e){} // Give ourselves time to process
worker.end(true);
try { workerThread.join(); } catch (Exception e){ e.printStackTrace(); }数据结构与算法分析
韦斯 (Mark Allen Weiss) / 陈越 / 机械工业出版社 / 2016-3-1 / 69.00元
本书是国外数据结构与算法分析方面的经典教材,使用卓越的Java编程语言作为实现工具讨论了数据结构(组织大量数据的方法)和算法分析(对算法运行时间的估计)。本书把算法分析与有效率的Java程序的开发有机地结合起来,深入分析每种算法,内容全面、缜密严格,并细致讲解精心构造程序的方法。一起来看看 《数据结构与算法分析》 这本书的介绍吧!
JSON 在线解析
在线 JSON 格式化工具
HEX CMYK 转换工具
HEX CMYK 互转工具
