本文整理了Java中net.sf.ehcache.Cache.replace()
方法的一些代码示例,展示了Cache.replace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.replace()
方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:replace
暂无
代码示例来源:origin: org.hibernate.ogm/hibernate-ogm-ehcache
public boolean replace(Element old, Element element) {
return delegate.replace( old, element );
}
代码示例来源:origin: justlive1/oxygen
@Override
public Object replace(String key, Object value) {
Element element = new Element(key, value);
element = cache.replace(element);
return element == null ? null : element.getObjectValue();
}
代码示例来源:origin: justlive1/oxygen
@Override
public Object replace(String key, Object value, long duration, TimeUnit unit) {
Element element = new Element(key, value);
element.setTimeToLive((int) unit.toSeconds(duration));
element = cache.replace(element);
return element == null ? null : element.getObjectValue();
}
代码示例来源:origin: org.dd4t/dd4t-caching
@Override
protected <T> void storeElement(final String key, CacheElement<T> cacheElement) {
if (!isEnabled()) {
return;
}
final Element element = new Element(key, cacheElement);
element.setTimeToLive(cacheTTL);
if (cache.isKeyInCache(key)) {
cache.replace(element);
} else {
cache.put(element);
}
}
代码示例来源:origin: org.apache.directory.server/apacheds-mavibot-partition
entryCache.replace( new Element( id, entry ) );
代码示例来源:origin: org.apache.directory.server/apacheds-jdbm-partition
entryCache.replace( new Element( id, entry ) );
内容来源于网络,如有侵权,请联系作者删除!