JXSE 2.5 : What's Cool #5 -- java.util.concurrent

本文介绍了JXSE2.5版本中引入的Java并发库,包括如何通过使用这些库简化JXTA应用程序的实现,消除对JXSE私有库的依赖,并提升性能。
http://weblogs.java.net/blog/bondolo/archive/2007/09/jxse_25_whats_c_4.html

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

 

JXSE 2.5 : What's Cool #5 -- java.util.concurrent

Posted by bondolo on September 20, 2007 at 5:03 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 use of the java.util.concurrent package, also known as the JSR-166 utilities, within JXSE 2.5 has been primarily about simplifying the implementation, obsoleting use of JXSE private utilities (mostly net.jxta.impl.util.UnbiasedQueue) and improving performance by allowing greater concurrency. By making use of the concurrency utilities in JXSE 2.5 the implementation is easier to understand, debug and extend. Use of ConcurrentHashMap has been particularly useful in simplifying several areas which where very complicated due to concurrency requirements.

We have also found the java.util.concurrent.atomic utilities very useful for simplifying code which required atomic counters and atomic booleans. In a few places we have started to use the java.util.concurrent.locks utilities and expect that future versions of JXSE will make more use of these utilities.

The next entry in this series will talk about JXSE 2.5's use of the java.util.concurrent Executor and ScheduledExecutor.

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值