Xmemcatch 初学者 第一章
来源:互联网 发布:68淘宝小号官网 编辑:程序博客网 时间:2024/05/19 13:59
相关的API : http://xmemcached.googlecode.com/svn/trunk/apidocs/net/rubyeye/xmemcached/XMemcachedClientBuilder.html
初学者指南:http://code.google.com/p/xmemcached/wiki/User_Guide_zh#使用指南
新命令介绍: http://code.google.com/p/memcached/wiki/NewCommands
下载地址:http://code.google.com/p/memcached/downloads/list
在linux 下安装memcatch:
http://www.ccvita.com/257.html
http://www.2cto.com/os/201203/125164.html
http://www.cnblogs.com/sunson/archive/2012/04/07/2436086.html (详细)
MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses("localhost:11211")); MemcachedClient memcachedClient = builder.build(); try { memcachedClient.set("hello", 0, "Hello,xmemcached"); String value = memcachedClient.get("hello"); System.out.println("hello=" + value); memcachedClient.delete("hello"); value = memcachedClient.get("hello"); System.out.println("hello=" + value); } catch (MemcachedException e) { System.err.println("MemcachedClient operation fail"); e.printStackTrace(); } catch (TimeoutException e) { System.err.println("MemcachedClient operation timeout"); e.printStackTrace(); } catch (InterruptedException e) { // ignore } try { //close memcached client memcachedClient.shutdown(); } catch (IOException e) { System.err.println("Shutdown MemcachedClient fail"); e.printStackTrace(); }
maven配置
<dependency>
<groupId>com.googlecode.xmemcached</groupId>
<artifactId>xmemcached</artifactId>
<version>1.3.8</version>
</dependency>
- Xmemcatch 初学者 第一章
- 初学者 第一章初识java
- GTK+ 2.x初学者指南.第一章
- 初学者的逆向工程-第一章 CPU概论
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者!
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者
- 初学者
- oracle 触发器 对同一表的操作
- poj1274 - The Perfect Stall
- MTV 开发模式
- C#中Dictionary的用法及用途
- C++里你知道的和不知道的一些东西
- Xmemcatch 初学者 第一章
- 二叉排序树
- MFC对话框应用程序添加自定义消息
- 关于DataTable的Select排序的问题
- spring 加载XML文件
- Android中的多种文件读写操作方法
- 人生三壶茶
- struts2核心配置
- Spring 数据访问策略