本文整理了Java中net.spy.memcached.compat.log.Logger.isInfoEnabled()
方法的一些代码示例,展示了Logger.isInfoEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isInfoEnabled()
方法的具体详情如下:
包路径:net.spy.memcached.compat.log.Logger
类名称:Logger
方法名:isInfoEnabled
[英]True if info is enabled for this logger.
[中]如果已为此记录器启用信息,则为True。
代码示例来源:origin: com.couchbase.client/couchbase-client
@Override
public boolean isInfoEnabled() {
return logger.isInfoEnabled();
}
代码示例来源:origin: naver/arcus-java-client
public <T> boolean put(String k, T v) {
if (v == null) {
return false;
}
try {
cache.put(new Element(k, v));
return true;
} catch (Exception e) {
if (logger.isInfoEnabled()) {
logger.info("failed to put to the local cache : %s", e.getMessage());
}
return false;
}
}
代码示例来源:origin: naver/arcus-java-client
public LocalCacheManager(String name, int max, int exptime, boolean copyOnRead, boolean copyOnWrite) {
this.cache = CacheManager.getInstance().getCache(name);
if (cache == null) {
CacheConfiguration config =
new CacheConfiguration(name, max)
.copyOnRead(copyOnRead)
.copyOnWrite(copyOnWrite)
.memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LRU)
.eternal(false)
.timeToLiveSeconds(exptime)
.timeToIdleSeconds(exptime)
.diskExpiryThreadIntervalSeconds(60)
.persistence(new PersistenceConfiguration().strategy(PersistenceConfiguration.Strategy.NONE));
this.cache = new Cache(config, null, null);
CacheManager.getInstance().addCache(cache);
if (logger.isInfoEnabled()) {
logger.info("Arcus k/v local cache is enabled : %s", cache.toString());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!