本文整理了Java中net.sf.ehcache.Ehcache.isKeyInCache()
方法的一些代码示例,展示了Ehcache.isKeyInCache()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.isKeyInCache()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:isKeyInCache
[英]An inexpensive check to see if the key exists in the cache.
Since no assertions are made about the state of the Element it is possible that the Element is expired, but this method still returns true.
[中]一种廉价的检查,以查看缓存中是否存在密钥。
由于没有关于元素状态的断言,因此元素可能已过期,但此方法仍然返回true。
代码示例来源:origin: gocd/gocd
public boolean isKeyInCache(Object key) {
return ehCache.isKeyInCache(key);
}
代码示例来源:origin: AxonFramework/AxonFramework
@Override
public <K> boolean containsKey(K key) {
return ehCache.isKeyInCache(key);
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public boolean contains(Object key) {
return getCache().isKeyInCache( key );
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean isKeyInCache(Object key) {
return underlyingCache.isKeyInCache(key);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Returns <code>true</code> if this region contains data for the given key.
* <p>
* This is a Hibernate 3.5 method.
*/
public boolean contains(Object key) {
return cache.isKeyInCache(key);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean isKeyInCache(Object arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.isKeyInCache(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isKeyInCache(Object key) {
return underlyingCache.isKeyInCache(key);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Returns <code>true</code> if this region contains data for the given key.
* <p>
* This is a Hibernate 3.5 method.
*/
public boolean contains(Object key) {
return cache.isKeyInCache(key);
}
}
代码示例来源:origin: org.jasig.portal/uPortal-utils-core
/**
* This does "{@link #get(Object)} != null".
*
* @see java.util.Map#containsKey(java.lang.Object)
*/
@Override
public boolean containsKey(Object key) {
return this.cache.isKeyInCache(key);
}
代码示例来源:origin: org.axonframework/axon-messaging
@Override
public <K> boolean containsKey(K key) {
return ehCache.isKeyInCache(key);
}
代码示例来源:origin: org.apache.portals.jetspeed-2/jetspeed-cm
public boolean isKeyInCache(Object key)
{
return ehcache.isKeyInCache(key);
}
代码示例来源:origin: org.dspace/dspace-services
public boolean exists(String key) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
return cache.isKeyInCache(key);
}
代码示例来源:origin: org.dspace/dspace-services-impl
public boolean exists(String key) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
return cache.isKeyInCache(key);
}
代码示例来源:origin: DSpace/DSpace
public boolean exists(String key) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
return cache.isKeyInCache(key);
}
代码示例来源:origin: ehcache/ehcache-jcache
@Override
public boolean containsKey(final K key) {
checkNotClosed();
if(key == null) throw new NullPointerException();
return ehcache.isKeyInCache(key);
}
代码示例来源:origin: org.ehcache/jcache
@Override
public boolean containsKey(final K key) {
checkNotClosed();
if(key == null) throw new NullPointerException();
return ehcache.isKeyInCache(key);
}
代码示例来源:origin: org.apache.portals.jetspeed-2/jetspeed-cm
public boolean isKeyInCache(Object key)
{
ContentCacheKey cckey = (ContentCacheKey)key;
return ehcache.isKeyInCache(cckey.getKey());
}
代码示例来源:origin: com.atlassian.cache/atlassian-cache-ehcache
@Override
public boolean containsKey(@Nonnull K key)
{
return delegate.isKeyInCache(wrap(key));
}
代码示例来源:origin: apache/cxf
public void remove(String identifier) {
if (cache != null && !StringUtils.isEmpty(identifier) && cache.isKeyInCache(identifier)) {
cache.remove(identifier);
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security
public void remove(String identifier) {
if (cache != null && !StringUtils.isEmpty(identifier) && cache.isKeyInCache(identifier)) {
cache.remove(identifier);
}
}
内容来源于网络,如有侵权,请联系作者删除!