- 授权协议: 未知
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://code.google.com/p/sccache/
- 软件文档: http://code.google.com/p/sccache/wiki/Quickstart
软件介绍
这是SHOP.COM 网站所使用的对象缓存系统,主要特性包括如下几个方面:
* 支持进程内和CS 模式的缓存结构
* 可以进行水平扩展
* 缓存对象可被存到磁盘中
* 支持关联主键
* 非事务
* 支持任意长度的主键和键值
* 根据 TTL 进行自动垃圾回收
* 可以运行于容器中或者是独立平台运行
示例代码:
List<SCClientManager> clientSet = new ArrayList<SCClientManager>();
SCClientFactory clientFactory = ShopComCacheFactory.getClientFactory();
SCClientContext context = clientFactory.newContext();
context.address(new InetSocketAddress(/*address 1*/, /*port number 1*/));
SCClientManager manager = clientFactory.newClientManager(context);
clientSet.add(manager);
// add additional managers for each cache server
myCache = new SCCache(new SCMultiManager(clientSet));
// see if your object is in the cache
MyObject obj = (MyObject)myCache.get(new SCDataBlock(myKey));
// if it's not, allocate it and add it to the cache
if ( obj == null )
{
obj = new MyObject();
myCache.put(new SCDataBlock(myKey, obj));
}
Android 源码设计模式解析与实战
何红辉、关爱民 / 人民邮电出版社 / 2015-11 / 79.00元
本书专门介绍Android源代码的设计模式,共26章,主要讲解面向对象的六大原则、主流的设计模式以及MVC和MVP模式。主要内容为:优化代码的首步、开闭原则、里氏替换原则、依赖倒置原则、接口隔离原则、迪米特原则、单例模式、Builder模式、原型模式、工厂方法模式、抽象工厂模式、策略模式、状态模式、责任链模式、解释器模式、命令模式、观察者模式、备忘录模式、迭代器模式、模板方法模式、访问者模式、中介......一起来看看 《Android 源码设计模式解析与实战》 这本书的介绍吧!
