http://weblogs.java.net/blog/bondolo/archive/2007/10/jxse_25_whats_c_5.html

————————————————————————————————————————————————————————

JXSE 2.5 : What's Cool #6 -- PeerGroup Executor and ScheduledExcutor

Posted by bondolo on October 9, 2007 at 1:32 PM EDT

JXSE (JXTA for Java SE/EE 5.0) 2.5 contains quite a number of exciting changes for JXTA application developers. This little series will look at a few of the important changes in the upcoming release.

JXSE 2.4 was the first version to require Java Standard Edition 5.0. For that release we used only a small amount of JSE 5 specific functionality. The requirement of JSE 5.0 was primarily about advancing the support matrix to include the then newly released JSE 6 and providing the opportunity to take advantage of new features in future releases. In JXSE 2.4.1 we started to make much greater use of JSE 5.0 specific APIs, and most significantly the new java.util.concurrent utilities. In JXSE 2.5 we have continued to make much greater use throughout the JXSE source.

The concurrency utilities provide several flavours of task executors. The Executor and ScheduledExecutor classes provide a convenient way to execute tasks without the overhead of the normal Thread lifecycle. For JXSE the use of Executor is a very good fit. There are a very large number of short lived operations or tasks that JXSE performs to maintain the JXTA network and to handle application I/O. JXSE currently makes fairly heavy use of Timer for periodic maintenance tasks. We expect that in future JXSE releases we will replace all of the Timer usage with ScheudledExecutor.

One difficulty we have found with Executor is that the default policy is not well suited to I/O frameworks. The standard policy uses a fixed base number of threads and a fixed size queue. If the queue fills then additional threads are started to a fixed maximum. The policy that would work best for JXSE and other I/O driven systems is a fixed base number of threads and a fixed size queue. Additional threads would be started for additional tasks to a fixed maximum. After that tasks would be queued to a fixed maximum at which point the task submitters would block until their tasks could be enqueued or executed. The effect of the default policy is that when the base of Threads are occupied new tasks will be started with much higher latency unless the system is entirely saturated with tasks.

The Executor interface does allow some policy to be controlled, but we haven't really figured out how to effectively override the standard policy. Suggestions and or contributions would, of course, be very welcome!

JXSE 2.5 : What's Cool #6 -- PeerGroup Executor and ScheduledExcutor相关推荐

  1. BGP进阶学习之RR与peer-group

    RR向自己的客户端与非客户端反射路由更新的时候,有两个地方需要注意: 1.       只反射最佳路由 2.       对于自身始发的路由,不携带RR的originator和cluster list ...

  2. JXTA HelloWorld on JXSE 2.5 【二】

    上一篇介绍了<JXTA技术手册>中的第一个Hello World的调通的过程.整个程序中,最核心的代码就是调用NetPeerGroupFactory()方法,该方法将在当前目录寻找配置文件 ...

  3. JXTA HelloWorld on JXSE 2.5 【一】

    首先感叹一下关于JXTA的书籍实在是太少见了,我手头的<JXTA技术手册>中文版是清华大学出版社2004年4月第一版的4000册之一,到如今,2008年7月,仍然在JXTA陈旧的版本下指导 ...

  4. BGP 同步 黑洞 peergroup rr 联邦 full-mesh

    转载于:https://blog.51cto.com/liushuo890/1200566

  5. BGP Soft Reset Enhancement

    Feture Overview: 对每个peer的policy(如,route-map,distribute-list,prefix-list,filter-list等),可能会影响inbound或o ...

  6. 父子对等组之间的关系

    遇到一个问题:超级结点和边缘结点都加入对等组P 超级结点在对等组P中启动汇聚服务 边缘结点连接到超级结点 此时边缘结点(创建)加入P的子对等组C 问题:超级结点是否有必要也创建或加入对等组C 以保证边 ...

  7. cisco网络故障处理手册

    故障处理方法   一.网络的复杂性 一般网络包括路由.拨号.交换.视频.WAN(ISDN.帧中继.ATM.-).LAN.VLAN.- 二.故障处理模型 1. 界定问题(Define the Probl ...

  8. 某网络专业人士笔记(超级珍藏)

    第1章 故障处理方法 一.网络的复杂性 一般网络包括路由.拨号.交换.视频.WAN(ISDN.帧中继.ATM.-).LAN.VLAN.- 二.故障处理模型 1. 界定问题(Define the Pro ...

  9. 《CCIE路由和交换认证考试指南(第5版) (第2卷)》——1.2节构建BGP邻居关系...

    本节书摘来自异步社区<CCIE路由和交换认证考试指南(第5版) (第2卷)>一书中的第1章,第1.2节构建BGP邻居关系,作者 [美]那比克 科查理安(Narbik Kocharians) ...

最新文章

  1. 如何编辑PDF文件,PDF编辑器如何使用
  2. R语言使用ggplot2包使用geom_density()函数绘制分组密度图(添加直方图、分组颜色配置)实战(density plot)
  3. python用jieba进行分词并可视化
  4. WebBrowser安全警告
  5. 设计模式之外观模式学习笔记
  6. EnterpriseLibrary2.0系列文章及下载
  7. angular 绑定自定义属性_Angular2实现自定义双向绑定属性
  8. rem 之js代码获取font-size值(适合移动手机端)
  9. 推荐3个好用的Excel项目管理甘特图模板
  10. 阿里程序员推荐的9款最佳编程字体?
  11. 计算机文化基础知识点第十一版,计算机文化基础知识点总结(经典版) 考试专用.doc...
  12. Mac上的三款时钟屏保
  13. BREW:3G移动增值服务的黎明(转)
  14. cad老是弹出命令中发生异常_CAD为什么会异常退出?遇到CAD异常退出怎么办-百度经验...
  15. 不用电脑怎么设置路由器
  16. WINDOWS2008server安全策略设置
  17. MySQL讲义第 48 讲——select 查询之查询练习(六)
  18. 关于pytorch中各种矩阵乘法运算的区别
  19. Oracle卸载教程
  20. 关于功放的正确调整及安全匹配音箱方法的计算及说明

热门文章

  1. 谷歌研究员称 CVE-2020-1509 的补丁不完整,详情和 PoC 已发布
  2. 理解Angular的Reactive Form
  3. %@ include file=和jsp:include file=区别
  4. Nand_ECC_校验和纠错_详解
  5. 蓝桥杯 ADV-234 算法提高 字符串跳步
  6. 【note】Java程序设计基础第五版(下)
  7. 蓝桥杯 BASIC-24 基础练习 龟兔赛跑预测
  8. 【操作系统】进程的异步性
  9. 小学三年级计算机基础知识课件,小学三年级信息技术基础知识ppt课件.ppt
  10. idea 快速导入实现父类方法_三步快速提高物理成绩!准初三生暑假实现逆袭的实用方法...