JavaỊ̈߳ºÐÂÌØÕ÷ Ëø£¨ÉÏ£©
JavaỊ̈߳ºÐÂÌØÕ÷-Ëø£¨ÉÏ£©
ÔÚJava5ÖУ¬×¨ÃÅÌṩÁËËø¶ÔÏó£¬ÀûÓÃËø¿ÉÒÔ·½±ãµÄʵÏÖ×ÊÔ´µÄ·âËø£¬ÓÃÀ´¿ØÖƶԾºÕù×ÊÔ´²¢·¢·ÃÎʵĿØÖÆ£¬ÕâЩÄÚÈÝÖ÷Òª¼¯ÖÐÔÚjava.util.concurrent.locks °üÏÂÃæ£¬ÀïÃæÓÐÈý¸öÖØÒªµÄ½Ó¿ÚCondition¡¢Lock¡¢ReadWriteLock¡£
Condition
Condition ½« Object ¼àÊÓÆ÷·½·¨£¨wait¡¢notify ºÍ notifyAll£©·Ö½â³É½ØÈ»²»Í¬µÄ¶ÔÏó£¬ÒÔ±ãͨ¹ý½«ÕâЩ¶ÔÏóÓëÈÎÒâ Lock ʵÏÖ×éºÏʹÓã¬ÎªÃ¿¸ö¶ÔÏóÌṩ¶à¸öµÈ´ý set £¨wait-set£©¡£
Lock
Lock ʵÏÖÌṩÁ˱ÈʹÓà synchronized ·½·¨ºÍÓï¾ä¿É»ñµÃµÄ¸ü¹ã·ºµÄËø¶¨²Ù×÷¡£
ReadWriteLock
ReadWriteLock ά»¤ÁËÒ»¶ÔÏà¹ØµÄËø¶¨£¬Ò»¸öÓÃÓÚÖ»¶Á²Ù×÷£¬ÁíÒ»¸öÓÃÓÚдÈë²Ù×÷¡£
ÓйØËøµÄ½éÉÜ,APIÎĵµ½â˵ºÜ¶à£¬¿´µÃºÜ·³£¬»¹ÊÇ¿´¸öÀý×ÓÔÙ¿´Îĵµ±È½ÏÈÝÒ×Àí½â¡£
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* JavaỊ̈߳ºËø
*
* @author leizhimin 2009-11-5 10:57:29
*/
public class Test {
public static void main(String[] args) {
//´´½¨²¢·¢·ÃÎʵÄÕË»§
MyCount myCount = new MyCount("95599200901215522", 10000);
//´´½¨Ò»¸öËø¶ÔÏó
Lock lock = new ReentrantLock();
//´´½¨Ò»¸öÏ̳߳Ø
ExecutorService pool = Executors.newCachedThreadPool();
//´´½¨Ò»Ð©²¢·¢·ÃÎÊÓû§£¬Ò»¸öÐÅÓÿ¨£¬´æµÄ´æ£¬È¡µÄÈ¡£¬ºÃÈÈÄÖ°¡
Ïà¹ØÎĵµ£º
JavaỊ̈߳ºÏß³ÌջģÐÍÓëÏ̵߳ıäÁ¿
SCJP5ѧϰ±Ê¼Ç
ÒªÀí½âÏ̵߳÷¶ÈµÄÔÀí£¬ÒÔ¼°Ïß³ÌÖ´Ðйý³Ì£¬±ØÐëÀí½âÏß³ÌջģÐÍ¡£
Ïß³ÌÕ»ÊÇָijʱ¿ÌʱÄÚ´æÖÐÏ̵߳÷¶ÈµÄÕ»ÐÅÏ¢£¬µ±Ç°µ÷Óõķ½·¨×ÜÊÇλÓÚÕ»¶¥¡£Ïß³ÌÕ»µÄÄÚÈÝÊÇËæ×ųÌÐòµÄÔËÐж¯Ì¬±ä»¯µÄ£¬Òò´ËÑо¿Ïß³ÌÕ»±ØÐëÑ¡ÔñÒ»¸öÔËÐеÄʱ¿Ì£¨Êµ¼ÊÉÏÖ¸´úÂëÔËÐе½Ê²Ã´µØ· ......
1. Java¶ÁÈ¡Excel·½Ê½¶Ô±È
ÔÚJavaÖжÁдMS ExcelÎļþÖ÷ÒªÓÐÁ½ÖÖµäÐ͵ķ½·¨
l Java-To-ComµÄ·½Ê½£º
£¨£±£© jCom
£¨£²£© Jacob
l Ö±½ÓExcelÎļþ¶Áд
£¨£³£© jExcel
£¨£´£©&nbs ......
JavaỊ̈߳ºÏ̵߳Ľ»»¥
SCJP5ѧϰ±Ê¼Ç
Ï߳̽»»¥ÊDZȽϸ´ÔÓµÄÎÊÌ⣬SCJPÒªÇ󲻺ܻù´¡£º¸ø¶¨Ò»¸ö³¡¾°£¬±àд´úÂëÀ´Ç¡µ±Ê¹Óõȴý¡¢Í¨ÖªºÍ֪ͨËùÓÐÏ̡߳£
Ò»¡¢Ï߳̽»»¥µÄ»ù´¡ÖªÊ¶
SCJPËùÒªÇóµÄÏ߳̽»»¥ÖªÊ¶µãÐèÒª´Ójava.lang.ObjectµÄÀàµÄÈý¸ö·½·¨À´Ñ§Ï°£º
void notify()
......
JavaỊ̈߳ºÐÂÌØÕ÷-Óзµ»ØÖµµÄÏß³Ì
ÔÚJava5֮ǰ£¬Ïß³ÌÊÇûÓзµ»ØÖµµÄ£¬³£³£ÎªÁË“ÓД·µ»ØÖµ£¬ÆÆ·ÑÖÜÕÛ£¬¶øÇÒ´úÂëºÜ²»ºÃд¡£»òÕ߸ɴàÈÆ¹ýÕâµÀ¿²£¬×ß±ðµÄ·ÁË¡£
ÏÖÔÚJavaÖÕÓÚÓпɷµ»ØÖµµÄÈÎÎñ£¨Ò²¿ÉÒÔ½Ð×öỊ̈߳©ÁË¡£
¿É·µ»ØÖµµÄÈÎÎñ±ØÐëʵÏÖCallable½Ó¿Ú£¬ÀàËÆµÄ£¬ÎÞ·µ»ØÖµµÄÈÎÎñ±ØÐëRu ......