JavaÈçºÎ±éÀúMCËùÓÐITEM
Java
鍼뱎˜
MC
ËùÓÐ
ITEM
1
¡¢
mc
±éÀú
item
ÔÀí
Mc
±éÀú
item
Óõ½µÄÃüÁîÓÐÈý¸ö£º
stats items
£¬
stats cachedump, get
¡£Í¨¹ý
telnet
³ÌÐò
telnet
µ½
mc
·þÎñÆ÷ÉÏ£¨
telnet ip
µØÖ·
¶Ë¿ÚºÅ£¬Èç
telnet 192.168.0.1 11211
£©£¬ÒÀ´ÎÖ´ÐÐÉÏÊö
3
¸öÃüÁî¼´¿É±éÀú
mc
µÄ
item
¶ÔÏ󣬼°²é¿´
key
¶ÔÓ¦µÄ
value
Öµ¡£
1)
stats items
£ºÏÔʾ¸÷¸ö
slab
ÖÐ
item
µÄÊýÄ¿ºÍ×îÀÏ
item
µÄÄêÁä
(
×îºóÒ»´Î·ÃÎʾàÀëÏÖÔÚµÄÃëÊý
)
stats items
STAT items:1:number 2
STAT items:1:age 847
STAT items:4:number 1
STAT items:4:age 831
STAT items:10:number 1
STAT items:10:age 830
END
2
£©
stats cachedump
£º
stats cachedump
slab_id limit_num
£¬ÏÔʾij¸ö
slab
ÖеÄÇ°
limit_num
¸ö
key
ÁÐ±í£¬ÏÔʾ¸ñʽÈçÏ£º
ITEM key_name [
value_length b; expire_time|access_time s]
ÆäÖУ¬
memcached 1.2.2
¼°ÒÔÇ°°æ±¾ÏÔʾµÄÊÇ·ÃÎÊʱ¼ä
(timestamp)
£¬
1.2.4
ÒÔÉÏ°æ±¾£¬°üÀ¨
1.2.4
ÏÔʾ
¹ýÆÚʱ¼ä
(timestamp)
£¬Èç¹ûÊÇÓÀ²»¹ýÆÚµÄ
key
£¬
expire_time
»áÏÔʾΪ·þÎñÆ÷Æô¶¯µÄʱ¼ä¡£
ÏÂÊö½Å±¾ÎªÏÖʵÉÏÊö
item 1
ϵÄËùÓÐ
key
Öµ£¬Èç
2248.516289644596
stats cachedump 1 0
ITEM 2248.516289644596 [4 b;
1257986909 s]
ITEM 3626.4522262678565 [4
b; 1257986895 s]
END
ÖÁ´Ë£¬Ö»ÒªÑ»·
1
£©ÁгöµÄ
items
ºÍ
2
£©ÏµľßÌåÿ¸ö
item
¶ÔÓ¦µÄËùÓÐ
key
£¬¼´¿É±éÀú
mc
Öдæ·ÅµÄËùÓжÔÏóµÄ
key
Öµ£¬ÄÇô£¬Ö»Òª
get
¸Ã
key
Öµ£¬¼´¿É»ñÈ¡
key
¶ÔÓ¦µÄ
value
Öµ¡£
2
¡¢
java
´úÂëʵÏÖ£¬´ýÐø
Ïà¹ØÎĵµ£º
package com.chinacache.boss.queryservice.service.impl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.chinacache.boss.queryservice.excepti ......
package test;
import java.lang.reflect.Method;
public class InvokeTest {
/**
*
* main ·½·¨
* @param args
* void
*/
public static void main(String[] args) {
try {
&nbs ......
ÏÈ¿´¸öÀý×Ó£º
½Ó¿Ú
package example;
public interface Basic {
public void hello();
}
½Ó¿ÚµÄʵÏÖÀà
package example;
public class BasicService implements Basic {
public void hello() {
Sysyt ......
1¡¢¼òµ¥ java
2¡¢¿ÉÒÆÖ²ÐÔ Ò»´Î±àÒë´¦´¦ÔËÐÐ
3¡¢ÃæÏò¶ÔÏó
4¡¢·Ö²¼Ê½ java°Ñ´ò¿ªÌ×½Ó×ֵȷ±ËöµÄÍøÂçÈÎÎñ±äµÄ·Ç³£¼òµ¥
5¡¢½¡×³ÐÔ java±àÒëÆ÷¿ÉÒÔ¼ì²é³öÆäËûÓïÑÔÔÚÔËÐÐʱ²ÅÄÜ·¢ÏֵĴíÎó
6¡¢¶àÏß³Ì ¶àÏ̵߳ļòµ¥ÐÔÊÇjavaÁ÷ÐÐÓÚ·þÎñÆ÷±à³ÌµÄÖ»ÒªÔÒò
7¡¢°²È«
8¡¢½á¹¹ÖÐÁ¢
9¡¢¶¯Ì¬
¡£¡£¡£ ......
¿ÉÒÔ°ÑÆÕͨµÄJava³ÌÐò×ö³ÉÕæÕýµÄexe,Ò²¾ÍÊǵ¥Ò»¸öexe¾Í¿ÉÒÔÔÚûÓа²×°JVMµÄ»úÆ÷ÉÏÔËÐС£ÕâÑùµÄ¹¤¾ß³£¼ûµÄÓÐJETºÍgcj.Ç°ÕßÊÇÊշѵģ¬¶øÇÒ×ö³öÀ´µÄexe»¹ÊÇÐèÒªÒ»¶Ñdll¡£ÍƼöʹÓÃgcj.ËûÓÐwindowsºÍLinux°æ£¬Ö±½ÓÏÂÔØzip°ü£¬²»ÐèÒª°²×°£¬ÀïÃæÓв»ÉÙÀý×Ó£¬Ò»Ð©buildµÄÅú´¦ÀíÎļþ¡£´ÓÔÀíÀ´Ëµgcj×Ô¼ºÊµÏÖÁËJVM¹æ·¶£¬Ò²¾ÍÊÇÄ ......