Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ö÷Ì⣺ʵսjava Concurrent

±àд¶àÏ̵߳ijÌÐòÒ»Ö±¶¼ÊÇÒ»¼þ±È½ÏÂé·³µÄÊÂÇ飬Ҫ¿¼ÂǺܶàÊÂÇ飬´¦Àí²»ºÃ»¹»á³öºÜ¶àÒâÏë²»µ½µÄÂé·³¡£¼ÓÉÏÏÖÔںܶ࿪·¢Õß½Ó´¥µ½µÄÏîÄ¿¶¼ÊÇ´ò×ÅÆóÒµ¼¶ÆìºÅµÄB/SÏîÄ¿£¬´ó¶àÊýÈ˶¼ºÜÉÙÉæ¼°¶àỊ̈߳¬ÕâÓÖΪ±¾ÎĵÄÖ÷½ÇÔö¼ÓÁËÒ»·ÝÉñÃظС£
½²µ½Java¶àỊ̈߳¬´ó¶àÊýÈËÄÔº£ÖÐÌø³öÀ´µÄÊÇThread¡¢Runnable¡¢synchronized……ÕâЩÊÇ×î»ù±¾µÄ¶«Î÷£¬ËäÈ»ÒѾ­×㹻ǿ
´ó£¬µ«ÏëÒªÓúû¹Õæ²»ÈÝÒס£´ÓJDK
1.5¿ªÊ¼£¬Ôö¼ÓÁËjava.util.concurrent°ü£¬ËüµÄÒýÈë´ó´ó¼ò»¯Á˶àÏ̳߳ÌÐòµÄ¿ª·¢£¨Òª¸ÐлһÏ´óÅ£Doug Lee£©¡£
java.util.concurrent°ü·Ö³ÉÁËÈý¸ö²¿·Ö£¬·Ö±ðÊÇjava.util.concurrent¡¢
java.util.concurrent.atomicºÍjava.util.concurrent.lock¡£ÄÚÈݺ­¸ÇÁ˲¢·¢¼¯ºÏÀà¡¢Ï̳߳ػúÖÆ¡¢Í¬
²½»¥³â»úÖÆ¡¢Ḭ̈߳²È«µÄ±äÁ¿¸üй¤¾ßÀà¡¢ËøµÈµÈ³£Óù¤¾ß¡£
ΪÁ˱ãÓÚÀí½â£¬±¾ÎÄʹÓÃÒ»¸öÀý×ÓÀ´×ö˵Ã÷£¬½»´úÒ»ÏÂËüµÄ³¡¾°£º
¼ÙÉèÒª¶ÔÒ»Ì×10¸ö½Úµã×é³ÉµÄ»·¾³½øÐмì²é£¬Õâ¸ö»·¾³ÓÐÁ½¸öÈë¿Úµã£¬Í¨¹ý½Úµã¼äµÄÒÀÀµ¹Øϵ¿ÉÒÔ±éÀúµ½Õû¸ö»·¾³¡£ÒÀÀµ¹Øϵ¿ÉÒÔ¹¹³ÉÒ»ÕÅÓÐÏòͼ£¬¿ÉÄÜ´æÔÚ»·¡£ÎªÁËÌá¸ß¼ì²éµÄЧÂÊ£¬¿¼ÂÇʹÓöàÏ̡߳£
1¡¢Executors
ͨ¹ýÕâ¸öÀàÄܹ»»ñµÃ¶àÖÖÏ̳߳صÄʵÀý£¬ÀýÈç¿ÉÒÔµ÷ÓÃnewSingleThreadExecutor()»ñµÃµ¥Ï̵߳Ä
ExecutorService£¬µ÷ÓÃnewFixedThreadPool()»ñµÃ¹Ì¶¨´óСÏ̳߳صÄExecutorService¡£Äõ½
ExecutorService¿ÉÒÔ×öµÄÊÂÇé¾Í±È½Ï¶àÁË£¬×î¼òµ¥µÄÊÇÓÃËüÀ´Ö´ÐÐRunnable¶ÔÏó£¬Ò²¿ÉÒÔÖ´ÐÐһЩʵÏÖÁË
Callable<T>µÄ¶ÔÏó¡£ÓÃThreadµÄstart()·½·¨Ã»Óзµ»ØÖµ£¬Èç¹û¸ÃÏß³ÌÖ´Ðеķ½·¨Óзµ»ØÖµÄÇÓÃ
ExecutorService¾ÍÔٺò»¹ýÁË£¬¿ÉÒÔÑ¡Ôñsubmit()¡¢invokeAll()»òÕßinvokeAny()£¬¸ù¾Ý¾ßÌåÇé¿öÑ¡ÔñºÏÊʵķ½
·¨¼´¿É¡£
Java´úÂë
package
 service;  
  
import
 java.util.ArrayList;  
import
 java.util.List;  
import
 java.util.concurrent.ExecutionException;  
import
 java.util.concurrent.ExecutorService;  
import
 java.util.concurrent.Executors;  
import
 java.util.concurrent.Future;  
import
 java.util.concurrent.TimeUnit;  
  
/**
 
 * Ï̳߳طþÎñÀà
 
 * 
 
 * @author DigitalSonic
&n


Ïà¹ØÎĵµ£º

ÎÒºÍJavaµÄһЩÍùÊÂ

     ´ó¼ÒÖªµÀ£¬ÔÚ1991Ä꣬¼¸ºõÓëLinuxͬʱ£¬SUN·¢²¼ÁËJava±à³ÌÓïÑÔ¡£²»¾Ã£¬ÎҵĴóѧͬѧ£¨±ÈÎÒµÍÁ½Ä꣩Íõ¿Ëºê½ÌÊÚ£¨Ç廪²©Ê¿µ¼Ê¦£©ÓëSUNºÏ×÷³ÉÁ¢ÁËÖйú×îÔçµÄ“JavaÑо¿ÖÐÐÄ”£¬²¢ÇÒµ£ÈθÃÖÐÐÄÖ÷ÈΡ£´Ó´Ë£¬ÎÒ¿ªÊ¼×¢ÒâJava¼¼ÊõµÄ·¢Õ¹¶¯Ì¬¡£ÎÒ¼ÒÖеĴæÊ飬ÒÔJavaÊé¼®×î¶à£¨µ±È»£¬³ýÁËÊýѧÊé¼® ......

java native interface(JNI)¼¼Êõ¼òµ¥Ó¦ÓÃ

      ÊÖÉÏÒ»¸öÏîÄ¿ÐèҪͨ¹ýusb¿ÚÈ¥¶ÁÈ¡usbkeyµÄÐÅÏ¢£¬³§¼ÒÌṩµÄÖ»ÓÐC/C++µÄ½Ó¿Ú£¬¶øÖ÷Ó¦ÓÃÊÇjavaµÄ£¬ËùÒÔÐèҪʹÓÃjavaÈ¥µ÷Óö¯Ì¬Á´½Ó¿â£¬ËùÒÔ»¨Á˵ãʱ¼äÑо¿ÁËÏÂJNI¼¼Êõ£¬jdk¶ÔJNI¼¼Êõ·â×°µÃºÜµ½Î»£¬Ê¹ÓÃÆðÀ´·Ç³£¼òµ¥£¬JNI¼¼Êõ×î¹Ø¼ü»¹ÊÇÔÚÓÚjniÊý¾ÝÀàÐͺͱ¾µØÊý¾ÝÀàÐ͵Äת»»¡£Ïȼòµ¥ÂÞÁÐÏÂJNIµ ......

Java Reflection (JAVA·´Éä)

Reflection ÊÇ Java ³ÌÐò¿ª·¢ÓïÑÔµÄÌØÕ÷Ö®Ò»£¬ËüÔÊÐíÔËÐÐÖÐµÄ Java ³ÌÐò¶Ô×ÔÉí½øÐмì²é£¬»òÕß˵“×ÔÉ󔣬²¢ÄÜÖ±½Ó²Ù×÷³ÌÐòµÄÄÚ²¿ÊôÐÔ¡£ÀýÈ磬ʹÓÃËüÄÜ»ñµÃ Java ÀàÖи÷³ÉÔ±µÄÃû³Æ²¢ÏÔʾ³öÀ´¡£
Java µÄÕâÒ»ÄÜÁ¦ÔÚʵ¼ÊÓ¦ÓÃÖÐÒ²ÐíÓõò»ÊǺܶ࣬µ«ÊÇÔÚÆäËüµÄ³ÌÐòÉè¼ÆÓïÑÔÖиù±¾¾Í²»´æÔÚÕâÒ»ÌØÐÔ¡£ÀýÈ磬Pascal¡¢C ......

javaÓ¦ÓÃtomcatʵÏÖhttps ssl°²È«Á¬½ÓµÄ·½·¨

ÔÚÕ⿪ʼ֮ǰ£¬ÎÒÃǵÃÏÈÁ˽âÒ»ÏÂʲôÊÇhttps¡£
https (Secure Hypertext Transfer Protocol) = °²È«³¬Îı¾´«ÊäЭÒé
httpsµÄÌصãÊÇ£º
1.Êý¾Ý¼ÓÃÜ£¨SSL£© = Secure Socket Layer
2.Éí·ÝÈÏÖ¤
µ±ÄãµÄÏîÄ¿ÐèÒª¿¼ÂÇ°²È«ÐÔµÄʱºò£¬²¿·ÖÄ£¿é¿ÉÒÔÓõ½https¡£µ±È»ÕâЩ¶¼µÃµ½CA×¢²á£¬ÒªÇ®Ç®µÄŶ¡£
ÕâÀïÎÒÏë¸ø´ó¼Ò½éÉܸö²»ÊÕ·ÑµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ