首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
JDK5.0 特性-线程 Condition
】的更多相关文章
JDK5.0 特性-线程 Condition
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291471.html import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.…
JDK5.0特性-线程 Callable和Future
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291466.html import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; /** 从本节开始,主要介绍J2SE5.0与线程相关的新…
JDK5.0 特性线程 同步装置之CountDownLatch 同步装置之CyclicBarrier 线程 BlockingQueue
来自:http://www.cnblogs.com/taven/category/475298.html import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * CountDownLatch维护一个计数器,等待这个CountDownLatch的线程必须等到计数器为0时才可以继续. * 以…
JDK5.0 特性-线程锁Lock
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291470.html import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.locks.Lock; import java.util.concurren…
JDK5.0 特性-线程同步装置之Semaphore
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291474.html import java.util.ArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Semaphore; import java.util.concurrent.locks.L…
JDK5.0 特性-线程任务执行架构 ScheduledExecutorService
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291469.html import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util…
JDK5.0 特性 监控与管理虚拟机
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291465.html import java.lang.management.ClassLoadingMXBean; import java.lang.management.CompilationMXBean; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementF…
JDK5.0特性,使用ProcessBuilder执行本地命令
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.ut…
集合框架-工具类-JDK5.0特性-函数可变参数
1 package cn.itcast.p4.news.demo; 2 3 public class ParamterDemo { 4 5 public static void main(String[] args) { 6 // TODO Auto-generated method stub 7 // int sum = add(4, 5); 8 // System.out.println("sum="+sum); 9 // int sum1 = add(4, 5, 6); 10 /…
集合框架-工具类-JDK5.0特性-ForEach循环
1 package cn.itcast.p4.news.demo; 2 3 import java.util.ArrayList; 4 import java.util.HashMap; 5 import java.util.Iterator; 6 import java.util.List; 7 import java.util.Map; 8 9 public class ForEachDemo { 10 11 public static void main(String[] args) {…