本文整理了Java中net.sf.ehcache.Ehcache.putWithWriter()
方法的一些代码示例,展示了Ehcache.putWithWriter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.putWithWriter()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:putWithWriter
[英]Put an element in the cache writing through a CacheWriter. If no CacheWriter has been registered for the cache, then this method throws an exception.
Resets the access statistics on the element, which would be the case if it has previously been gotten from a cache, and is now being put back.
Also notifies the CacheEventListener, if the writer operation succeeds, that:
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
underlyingCache.putWithWriter(element);
}
代码示例来源:origin: net.sf.ehcache/ehcache
@Override
public Void put() {
underlyingCache.putWithWriter(element);
return null;
}
});
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element arg0) throws IllegalArgumentException, IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.putWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
@Override
public Void put() {
underlyingCache.putWithWriter(element);
return null;
}
});
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
underlyingCache.putWithWriter(element);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
@Override
public Void put() {
underlyingCache.putWithWriter(element);
return null;
}
});
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
underlyingCache.putWithWriter(element);
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* {@inheritDoc}
*/
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
cache.putWithWriter(element);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
underlyingCache.putWithWriter(element);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
@Override
public Void put() {
underlyingCache.putWithWriter(element);
return null;
}
});
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element arg0) throws IllegalArgumentException, IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.putWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void putWithWriter(Element arg0) throws IllegalArgumentException, IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.putWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void putWithWriter(Element arg0) throws IllegalArgumentException, IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.putWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: ehcache/ehcache-jcache
private void putAndWriteIfNeeded(final Element element) {
if (cfg.isWriteThrough()) {
try {
ehcache.putWithWriter(element);
} catch (RuntimeException e) {
ehcache.removeElement(element);
throw new CacheWriterException(e);
}
} else {
ehcache.put(element);
}
}
代码示例来源:origin: org.ehcache/jcache
private void putAndWriteIfNeeded(final Element element) {
if (cfg.isWriteThrough()) {
try {
ehcache.putWithWriter(element);
} catch (RuntimeException e) {
ehcache.removeElement(element);
throw new CacheWriterException(e);
}
} else {
ehcache.put(element);
}
}
内容来源于网络,如有侵权,请联系作者删除!