天天看點

xmemcached釋出1.3.3版本——支援touch和GAT

    public boolean touch(final string key, int exp, long optimeout)

            throws timeoutexception, interruptedexception, memcachedexception;

    public boolean touch(final string key, int exp) throws timeoutexception,

            interruptedexception, memcachedexception;

        public <t> t getandtouch(final string key, int newexp, long optimeout)

    public <t> t getandtouch(final string key, int newexp)

其中touch用于設定資料新的逾時時間,getandtouch則是在擷取資料的同時更新逾時時間。例如用memcached存儲session,可以在每次get的時候更新下資料的逾時時間來保活。請注意,這四個方法僅在使用memcached 1.6并且使用二進制協定的時候有效。

2、setlogginglevelverbosity方法可以作用于二進制協定。

3、重構錯誤處理子產品,使得異常資訊更友好。

4、将keyiterator和getkeyiterator聲明為deprecated,因為memached 1.6将移除stats cachedump協定,并且stats cachedump傳回資料有大小限制,周遊功能不具實用性。

maven引用:

 <dependency>

      <groupid>com.googlecode.xmemcached</groupid>

      <artifactid>xmemcached</artifactid>

      <version>1.3.3</version>

 </dependency>

文章轉自莊周夢蝶  ,原文釋出時間 2011-06-12