zoukankan      html  css  js  c++  java
  • JXSE 2.5 : What's Cool #5 java.util.concurrent

    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.

     
  • 相关阅读:
    Java中获取键盘输入值的三种方法
    java多线程处理与数据集合
    Apachetomcat学习
    Java之枚举
    多例设计模式与枚举
    权限管理(数据库部分)
    hdu 2458(最大独立集)
    hdu 1507(最大匹配)
    hdu 1350+hdu 1960(最小路径覆盖)
    hdu 1845(最大匹配)
  • 原文地址:https://www.cnblogs.com/cuizhf/p/2222250.html
Copyright © 2011-2022 走看看