本文整理了Java中net.sf.ehcache.Ehcache.removeWithWriter()
方法的一些代码示例,展示了Ehcache.removeWithWriter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.removeWithWriter()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:removeWithWriter
[英]Removes an net.sf.ehcache.Element from the Cache and any stores it might be in. This also removes through to a CacheWriter. If no CacheWriter has been registered for the cache, then this method throws an exception.
Also notifies the CacheEventListener after the element was removed, but only if an Element with the key actually existed.
[中]移除一个网。旧金山。ehcache。元素及其可能所在的任何存储。这也会删除到CacheWriter。如果没有为缓存注册CacheWriter,则此方法会引发异常。
还将在删除元素后通知CacheEventListener,但前提是具有键的元素实际存在。
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
return underlyingCache.removeWithWriter(key);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object arg0) throws IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.removeWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object key) throws IllegalStateException {
return cache.removeWithWriter(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
return underlyingCache.removeWithWriter(key);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
return underlyingCache.removeWithWriter(key);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
return underlyingCache.removeWithWriter(key);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object arg0) throws IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.removeWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object arg0) throws IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.removeWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean removeWithWriter(Object arg0) throws IllegalStateException, CacheException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.removeWithWriter(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: ehcache/ehcache-jcache
private boolean removeAndWriteIfNeeded(final K key) {
if (cfg.isWriteThrough()) {
ehcache.acquireWriteLockOnKey(key);
final Element previous = ehcache.getQuiet(key);
try {
return ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
ehcache.putQuiet(previous);
}
throw new CacheWriterException(e);
}
} else {
if (ehcache.isKeyInCache(key)) {
return ehcache.remove(key);
}
return false;
}
}
代码示例来源:origin: org.ehcache/jcache
private boolean removeAndWriteIfNeeded(final K key) {
if (cfg.isWriteThrough()) {
ehcache.acquireWriteLockOnKey(key);
final Element previous = ehcache.getQuiet(key);
try {
return ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
ehcache.putQuiet(previous);
}
throw new CacheWriterException(e);
}
} else {
if (ehcache.isKeyInCache(key)) {
return ehcache.remove(key);
}
return false;
}
}
代码示例来源:origin: org.ehcache/jcache
final Element previous = ehcache.getQuiet(key);
try {
ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
代码示例来源:origin: ehcache/ehcache-jcache
final Element previous = ehcache.getQuiet(key);
try {
ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
代码示例来源:origin: org.ehcache/jcache
try {
try {
ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
代码示例来源:origin: ehcache/ehcache-jcache
try {
try {
ehcache.removeWithWriter(key);
} catch (RuntimeException e) {
if(previous != null) {
内容来源于网络,如有侵权,请联系作者删除!