本文整理汇总了Java中com.subgraph.orchid.TorConfig.AutoBoolValue类的典型用法代码示例。如果您正苦于以下问题:Java AutoBoolValue类的具体用法?Java AutoBoolValue怎么用?Java AutoBoolValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AutoBoolValue类属于com.subgraph.orchid.TorConfig包,在下文中一共展示了AutoBoolValue类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadFromStore
import com.subgraph.orchid.TorConfig.AutoBoolValue; //导入依赖的package包/类
public void loadFromStore() {
logger.info("Loading cached network information from disk");
synchronized(loadLock) {
if(isLoaded) {
return;
}
boolean useMicrodescriptors = config.getUseMicrodescriptors() != AutoBoolValue.FALSE;
last = System.currentTimeMillis();
logger.info("Loading certificates");
loadCertificates(store.loadCacheFile(CacheFile.CERTIFICATES));
logElapsed();
logger.info("Loading consensus");
loadConsensus(store.loadCacheFile(useMicrodescriptors ? CacheFile.CONSENSUS_MICRODESC : CacheFile.CONSENSUS));
logElapsed();
if(!useMicrodescriptors) {
logger.info("Loading descriptors");
basicDescriptorCache.initialLoad();
} else {
logger.info("Loading microdescriptor cache");
microdescriptorCache.initialLoad();
}
needRecalculateMinimumRouterInfo = true;
logElapsed();
logger.info("loading state file");
stateFile.parseBuffer(store.loadCacheFile(CacheFile.STATE));
logElapsed();
isLoaded = true;
loadLock.notifyAll();
}
}
示例2: parseAutoBool
import com.subgraph.orchid.TorConfig.AutoBoolValue; //导入依赖的package包/类
private TorConfig.AutoBoolValue parseAutoBool(String value) {
if("auto".equalsIgnoreCase(value)) {
return AutoBoolValue.AUTO;
} else if("true".equalsIgnoreCase(value)) {
return AutoBoolValue.TRUE;
} else if("false".equalsIgnoreCase(value)) {
return AutoBoolValue.FALSE;
} else {
throw new IllegalArgumentException("Could not parse AutoBool value "+ value);
}
}
示例3: useMicrodescriptors
import com.subgraph.orchid.TorConfig.AutoBoolValue; //导入依赖的package包/类
private boolean useMicrodescriptors() {
return config.getUseMicrodescriptors() != AutoBoolValue.FALSE;
}