javaÖзÃÎÊmemcache
ÓÃspyºÍmemcached for javaÁ½ÖÖ·½Ê½¶Ômemcache½øÐвÙ×÷
Ò»¡¢spy
package com.test.memcache;
import java.net.InetSocketAddress;
import java.util.concurrent.Future;
import net.spy.memcached.MemcachedClient;
/**
* ±¾ÀàÓõİüÊÇmemcached-2.4.1.jar
* ÏÂÔØµØÖ·£º http://code.google.com/p/spymemcached/
*/
public class SpyTest {
public void putObject() {
try {
/* ½¨Á¢MemcachedClient ʵÀý£¬²¢Ö¸¶¨memcached·þÎñµÄIPµØÖ·ºÍ¶Ë¿ÚºÅ */
MemcachedClient mc = new MemcachedClient(new InetSocketAddress("127.0.0.1", 11211));
Future<Boolean> b = null;
/* ½«keyÖµ£¬¹ýÆÚʱ¼ä(Ãë)ºÍÒª»º´æµÄ¶ÔÏósetµ½memcachedÖÐ */
b = mc.set("key1", 60, "hello1"); // Èç¹ûÒÔǰ´æÔÚ£¬Ôò»á×Ô¶¯¸²¸Ç
if (b.get().booleanValue() == true) {
mc.shutdown();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void getObject() {
try {
/* ½¨Á¢MemcachedClient ʵÀý£¬²¢Ö¸¶¨memcached·þÎñµÄIPµØÖ·ºÍ¶Ë¿ÚºÅ */
MemcachedClient mc = new MemcachedClient(new InetSocketAddress("127.0.0.1", 11211));
/* °´ÕÕkeyÖµ´ÓmemcachedÖвéÕÒ»º´æ£¬²»´æÔÚÔò
Ïà¹ØÎĵµ£º
ÓйØJava¶ÔÏóµÄÐòÁл¯ºÍ·´ÐòÁл¯Ò²ËãÊÇJava»ù´¡µÄÒ»²¿·Ö£¬ÏÂÃæ¶ÔJavaÐòÁл¯µÄ»úÖÆºÍÔÀí½øÐÐһЩ½éÉÜ¡£
¡¡¡¡JavaÐòÁл¯Ë㷨͸Îö
¡¡¡¡Serialization£¨ÐòÁл¯£©ÊÇÒ»ÖÖ½«¶ÔÏóÒÔÒ»Á¬´®µÄ×Ö½ÚÃèÊöµÄ¹ý³Ì£»·´ÐòÁл¯deserializationÊÇÒ»ÖÖ½«ÕâЩ×Ö½ÚÖØ½¨³ÉÒ»¸ö¶ÔÏóµÄ¹ý³Ì¡£JavaÐòÁл¯APIÌṩһÖÖ´¦Àí¶ÔÏóÐòÁл¯µÄ±ê×¼»úÖÆ¡£ÔÚÕâÀ ......
ÔÚ×öpdfÎĵµ×ª³ÉjpgµÄʱºò£¬·¢ÏÖÁËJmagickµÄ´´½¨¸ßÖÊÁ¿µÄͼƬµÄÒ»¸öjavaÀà¿â,×Ô¼ºÒÔǰʹÓÃÁíÍâµÄÒ»¸öÀà¿â,¸Ð¾õÕâ¸ö¸üºÃµã,¾ÍÊÔ×ÅÓÃÁËÏÂ,¸Ð¾õ²»´í
1.ʹÓõÄwindowsϵÄjmagick-win-6.3.9-Q16.zip µØÖ·ÊÇ£ºhttp://downloads.jmagick.org/6.3.9/
2.doc¶ÔÓ¦µÄapiµØÖ·£ºhttp://downloads.jmagick.org/jmagick-doc/
3.°²×°Ima ......
ÔÚ×öpdfÎĵµ×ª³ÉjpgµÄʱºò£¬·¢ÏÖÁËJmagickµÄ´´½¨¸ßÖÊÁ¿µÄͼƬµÄÒ»¸öjavaÀà¿â,×Ô¼ºÒÔǰʹÓÃÁíÍâµÄÒ»¸öÀà¿â,¸Ð¾õÕâ¸ö¸üºÃµã,¾ÍÊÔ×ÅÓÃÁËÏÂ,¸Ð¾õ²»´í
1.ʹÓõÄwindowsϵÄjmagick-win-6.3.9-Q16.zip µØÖ·ÊÇ£ºhttp://downloads.jmagick.org/6.3.9/
2.doc¶ÔÓ¦µÄapiµØÖ·£ºhttp://downloads.jmagick.org/jmagick-doc/
3.°²×°Ima ......
JAVAºËÐļ¼Êõ¹Ûºó¸Ð
ÕâÖÜ´ó¼Ò¶¼»ù±¾ÉÏÂòÁËÒ»±¾¡¶JAVAºËÐļ¼Êõ¡·À´¿´£¬ËäÈ»ÎÒµÄÊéÏÂÖܲÅÄÜÄõ½£¬µ«ÊÇÎÒ»¹ÊÇ·ÁËϱðÈ˵쬴óÖÂÁ˽âÁËÒ»ÏÂÀïÃæµÄÄÚÈÝ¡£ÒÔϾÍÊÇÎÒ´Ö²ÚµÄÕûÀí¡£
JAVA²¢²»Ö»ÊÇÒ»ÖÖÓïÑÔ£¬¶øÊÇÒ»¸öÍêÕûµÄƽ̨£¬ÓÐÒ»¸öÅÓ´óµÄ¿â£¬ÆäÖаüº¬ºÜ¶à¿ÉÒÔÖØÓõĴúÂëºÍÒ»¸öÌṩÖîÈ簲ȫÐÔ£¬¿ç²Ù×÷ϵͳµÄ¿ÉÒÆ ......
Ò»¸öÈí¼þÉè¼ÆµÄºÃ»µ£¬ÎÒÏëºÜ´ó³Ì¶ÈÉÏÈ¡¾öÓÚËüµÄÕûÌå¼Ü¹¹£¬¶øÕâ¸öÕûÌå¼Ü¹¹Æäʵ¾ÍÊÇÄã¶ÔÕû¸öºê¹ÛÉÌÒµÒµÎñµÄ³éÏó¿ò¼Ü£¬µ±´ú±íÒµÎñÂß¼µÄ¸ß²ã³éÏó²ã½á¹¹ ºÏÀíʱ£¬Äãµ×²ãµÄ¾ßÌåʵÏÖÐèÒª¿¼Âǵľͽö½öÊÇһЩËã·¨ºÍһЩ¾ßÌåµÄÒµÎñʵÏÖÁË¡£µ±ÄãÐèÒªÔÙ¿ª·¢ÁíÒ»¸öÏà½üµÄÏîĿʱ£¬ÄãÒÔǰµÄ³éÏó²ã˵²»¶¨»¹¿ÉÒÔÔÙ´ÎÀûÓÃ ÄØ£¬Ãæ¶Ô¶ÔÏóµÄÉè¼Æ ......