本文整理了Java中net.sf.ehcache.Cache.dispose()
方法的一些代码示例,展示了Cache.dispose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.dispose()
方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:dispose
[英]Starts an orderly shutdown of the Cache. Steps are:
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
protected void doStop() throws Exception {
if (enabled) {
super.doStop();
if (executorService != null) {
executorService.shutdown();
}
LOGGER.info("Clear API keys from in-memory cache before stopping service");
cache.removeAll();
cache.dispose();
}
}
代码示例来源:origin: gravitee-io/gravitee-gateway
@Override
protected void doStop() throws Exception {
if (enabled) {
super.doStop();
if (executorService != null) {
executorService.shutdown();
}
LOGGER.info("Clear subscriptions from cache before stopping service");
cache.removeAll();
cache.dispose();
}
}
代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-subscriptions-cache
@Override
protected void doStop() throws Exception {
if (enabled) {
super.doStop();
if (executorService != null) {
executorService.shutdown();
}
LOGGER.info("Clear subscriptions from cache before stopping service");
cache.removeAll();
cache.dispose();
}
}
代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-apikeyscache
@Override
protected void doStop() throws Exception {
if (enabled) {
super.doStop();
if (executorService != null) {
executorService.shutdown();
}
LOGGER.info("Clear API keys from in-memory cache before stopping service");
cache.removeAll();
cache.dispose();
}
}
代码示例来源:origin: uk.ac.ebi.enfin.mi.cluster/micluster
private void shutdownIfActive( Cache cache ) {
if( Status.STATUS_ALIVE.equals( cache.getStatus() ) ) {
System.out.println( "Attempting to dispose of: " + cache.getName() + "..." );
cache.dispose();
} else {
System.out.println( "Cache('"+ cache.getName() +"') was not alive. Skipping dispose()..." );
}
}
}
代码示例来源:origin: datasalt/splout-db
/**
* Properly dispose this DNode.
*/
public void stop() throws Exception {
dbCache.dispose();
deployExecutor.shutdownNow();
factory.close();
httpExchanger.close();
hz.getLifecycleService().shutdown();
}
代码示例来源:origin: uk.ac.ebi.intact.bridges/intact-uniprot
@Override
public void close() {
if (this.cache != null){
if( Status.STATUS_ALIVE.equals( cache.getStatus() ) ) {
System.out.println( "Attempting to dispose of: " + cache.getName() + "..." );
cache.dispose();
}
}
if (cacheManager != null){
cacheManager.clearAll();
}
service.close();
}
代码示例来源:origin: apache/oozie
missingCache.dispose(); //discard
代码示例来源:origin: org.apache.oozie/oozie-core
missingCache.dispose(); //discard
内容来源于网络,如有侵权,请联系作者删除!