本文整理了Java中net.sf.ehcache.Ehcache.getQuiet()
方法的一些代码示例,展示了Ehcache.getQuiet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.getQuiet()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:getQuiet
[英]Gets an element from the cache, without updating Element statistics. Cache statistics are still updated.
[中]从缓存中获取元素,而不更新元素统计信息。缓存统计信息仍在更新中。
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Gets an element from the cache, without updating Element statistics. Cache statistics are
* still updated.
*
* @param key a serializable value
* @return the element, or null, if it does not exist.
*/
public Element getQuiet(Serializable key) throws RemoteException {
return cache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Object key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Serializable 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.getQuiet(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(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.getQuiet(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Gets a list of elements from the cache, for a list of keys, without updating Element statistics. Time to
* idle lifetimes are therefore not affected.
* <p>
* Cache statistics are still updated.
* <p>
* Callers should ideally first call this method with a small list of keys to gauge the size of a typical Element.
* Then a calculation can be made of the right number to request each time so as to optimise network performance and
* not cause an OutOfMemory error on this Cache.
*
* @param keys a list of serializable values which represent keys
* @return a list of Elements. If an element was not found or null, it will not be in the list.
*/
public List getElements(List keys) throws RemoteException {
if (keys == null) {
return new ArrayList();
}
List elements = new ArrayList();
for (int i = 0; i < keys.size(); i++) {
Serializable key = (Serializable) keys.get(i);
Element element = cache.getQuiet(key);
if (element != null) {
elements.add(element);
}
}
return elements;
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Element can never be null. Add a null guard just in case.
* @param key
*/
protected void update(final Object key) {
try {
Ehcache backingCache = getCache();
final Element element = backingCache.getQuiet(key);
if (element == null) {
if (LOG.isDebugEnabled()) {
LOG.debug(getName() + ": entry with key " + key + " has been removed - skipping it");
}
return;
}
refreshElement(element, backingCache);
} catch (final Exception e) {
// Collect the exception and keep going.
// Throw the exception once all the entries have been refreshed
// If the refresh fails, keep the old element. It will simply become staler.
LOG.warn(getName() + "Could not refresh element " + key, e);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
Element quickTest = underlyingCache.getQuiet(key);
if (quickTest == null || checkForRefresh(quickTest, accessTime, refreshAheadConfig.getTimeToRefreshMillis())) {
final Element ersatz = new Element(key, REFRESH_VALUE);
代码示例来源:origin: net.sf.ehcache/ehcache
final Element element = backingCache.getQuiet(key);
代码示例来源:origin: net.sf.ehcache/ehcache
try {
Ehcache backingCache = getCache();
Element element = backingCache.getQuiet(key);
if (element != null) {
return refreshElement(element, backingCache, quiet);
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Gets an element from the cache, without updating Element statistics. Cache statistics are
* still updated.
*
* @param key a serializable value
* @return the element, or null, if it does not exist.
*/
public Element getQuiet(Serializable key) throws RemoteException {
return cache.getQuiet(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Gets an element from the cache, without updating Element statistics. Cache statistics are
* still updated.
*
* @param key a serializable value
* @return the element, or null, if it does not exist.
*/
public Element getQuiet(Serializable key) throws RemoteException {
return cache.getQuiet(key);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Object key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Object key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Gets an element from the cache, without updating Element statistics. Cache statistics are
* still updated.
*
* @param key a serializable value
* @return the element, or null, if it does not exist.
*/
public Element getQuiet(Serializable key) throws RemoteException {
return cache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public Element getQuiet(Object key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
return underlyingCache.getQuiet(key);
}
代码示例来源:origin: com.madgag/mini-git-server-server
public Element getQuiet(Serializable key) throws IllegalStateException,
CacheException {
return self().getQuiet(key);
}
内容来源于网络,如有侵权,请联系作者删除!