本文整理了Java中net.sf.ehcache.Ehcache.isExpired()
方法的一些代码示例,展示了Ehcache.isExpired()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.isExpired()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:isExpired
[英]Checks whether this cache element has expired.
The element is expired if:
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return underlyingCache.isExpired(element);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element arg0) throws IllegalStateException, NullPointerException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.isExpired(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return underlyingCache.isExpired(element);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return underlyingCache.isExpired(element);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return underlyingCache.isExpired(element);
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* Checks whether this cache element has expired.
* <p/>
* The element is expired if:
* <ol>
* <li>the idle time is non-zero and has elapsed, unless the cache is eternal; or
* <li>the time to live is non-zero and has elapsed, unless the cache is eternal; or
* <li>the value of the element is null.
* </ol>
*
* @return true if it has expired
* @throws IllegalStateException
* if the cache is not {@link net.sf.ehcache.Status#STATUS_ALIVE}
* @throws NullPointerException
* if the element is null
*/
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return cache.isExpired(element);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public boolean isExpired(Element arg0) throws IllegalStateException, NullPointerException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.isExpired(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element arg0) throws IllegalStateException, NullPointerException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.isExpired(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isExpired(Element arg0) throws IllegalStateException, NullPointerException {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
return this.cache.isExpired(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: apache/cxf
public SecurityToken getToken(String identifier) {
if (cache == null) {
return null;
}
Element element = cache.get(identifier);
if (element != null && !cache.isExpired(element)) {
return (SecurityToken)element.getObjectValue();
}
return null;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security
public SecurityToken getToken(String identifier) {
if (cache == null) {
return null;
}
Element element = cache.get(identifier);
if (element != null && !cache.isExpired(element)) {
return (SecurityToken)element.getObjectValue();
}
return null;
}
代码示例来源:origin: com.madgag/mini-git-server-server
public boolean isExpired(Element element) throws IllegalStateException,
NullPointerException {
return self().isExpired(element);
}
代码示例来源:origin: rtyley/mini-git-server
public boolean isExpired(Element element) throws IllegalStateException,
NullPointerException {
return self().isExpired(element);
}
代码示例来源:origin: apache/cxf
public ResponseState getResponseState(String securityContextKey) {
Element element = responseCache.get(securityContextKey);
if (element != null) {
if (responseCache.isExpired(element)) {
responseCache.remove(securityContextKey);
return null;
}
return (ResponseState)element.getObjectValue();
}
return null;
}
代码示例来源:origin: apache/cxf
@SuppressWarnings("unchecked")
@ManagedOperation()
@Override
public Map<String, String> get(String user, String realm) {
Element element = cache.get(user + "@" + realm);
if (element != null && !cache.isExpired(element)) {
return (Map<String, String>)element.getObjectValue();
}
return null;
}
代码示例来源:origin: org.apache.cxf.services.sts/cxf-services-sts-core
@SuppressWarnings("unchecked")
@ManagedOperation()
@Override
public Map<String, String> get(String user, String realm) {
Element element = cache.get(user + "@" + realm);
if (element != null && !cache.isExpired(element)) {
return (Map<String, String>)element.getObjectValue();
}
return null;
}
代码示例来源:origin: apache/cxf
/**
* Return the given identifier if it is contained in the cache, otherwise null.
* @param id The identifier to check
*/
public String getId(String id) {
Element element = cache.get(id);
if (element != null) {
if (cache.isExpired(element)) {
cache.remove(id);
return null;
}
return (String)element.getObjectValue();
}
return null;
}
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common
/**
* Return true if the given identifier is contained in the cache
* @param identifier The identifier to check
*/
public boolean contains(String identifier) {
if (cache == null) {
return false;
}
Element element = cache.get(identifier);
if (element != null) {
if (cache.isExpired(element)) {
cache.remove(identifier);
return false;
}
return true;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!