商业中间件缓存技术,
参考看这么哥们的
[url]http://www.iteye.com/topic/257376[/url]
注意点:coherence 默认是服务器连接地址是localhost。所以下面可以直接访问。
参考看这么哥们的
[url]http://www.iteye.com/topic/257376[/url]
注意点:coherence 默认是服务器连接地址是localhost。所以下面可以直接访问。
package org.wolf.coherence;
import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;
/**
* oracle Coherence
*
* @author Administrator
*
*/
public class CoherenceDevelop {
public NamedCache createNameCache(String cacheName) {
return CacheFactory.getCache(cacheName);
}
public static void main(String[] args) {
NamedCache namedCache = new CoherenceDevelop().createNameCache("wolf");
namedCache.put("name1", "hello world xx");
System.out.println(namedCache.get("name1"));
}
}
本文提供了一个使用Oracle Coherence实现缓存管理的简单示例。通过创建名为'wolf'的缓存,并进行数据的存取操作,展示了Coherence的基本用法。

3314

被折叠的 条评论
为什么被折叠?



