当前位置: 首页>>代码示例>>Java>>正文


Java ConfigFactory.invalidateCaches方法代码示例

本文整理汇总了Java中com.typesafe.config.ConfigFactory.invalidateCaches方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigFactory.invalidateCaches方法的具体用法?Java ConfigFactory.invalidateCaches怎么用?Java ConfigFactory.invalidateCaches使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.typesafe.config.ConfigFactory的用法示例。


在下文中一共展示了ConfigFactory.invalidateCaches方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: before

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@BeforeClass
public void before() throws IOException {
    Path root = Files.createTempFile("stargraph-", "-dataDir");
    Path ntPath = createPath(root, factsId).resolve("triples.nt");
    copyResource("dataSets/simple/facts/triples.nt", ntPath);
    System.setProperty("stargraph.data.root-dir", root.toString());
    ConfigFactory.invalidateCaches();
    Config config = ConfigFactory.load().getConfig("stargraph");
    core = new Stargraph(config, false);
    core.setIndexerFactory(new NullIndexerFactory());
    core.setModelFactory(new NTriplesModelFactory(core));
    core.initialize();
}
 
开发者ID:Lambda-3,项目名称:Stargraph,代码行数:14,代码来源:SimpleKBTest.java

示例2: before

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@BeforeClass
public void before() {
    ConfigFactory.invalidateCaches();
    Config config = ConfigFactory.load().getConfig("stargraph");
    this.core = new Stargraph(config, false);
    this.core.setIndexerFactory(new TestDataIndexer.Factory());
    this.core.initialize();
    this.kbId = KBId.of("mytest", "mytype");
    this.indexer = core.getIndexer(kbId);
    List<String> expected = Arrays.asList("first", "second", "third");
    this.expected = expected.stream().map(s -> new TestData(false, false, s)).collect(Collectors.toList());
}
 
开发者ID:Lambda-3,项目名称:Stargraph,代码行数:13,代码来源:IndexerTest.java

示例3: beforeClass

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@BeforeClass
public void beforeClass() throws IOException {
    Path root = Files.createTempFile("stargraph-", "-dataDir");
    Path factsPath = createPath(root, KBId.of("obama", "facts"));
    Path hdtFilePath = factsPath.resolve("triples.hdt");
    Path ntFilePath = factsPath.resolve("triples.nt");
    copyResource("dataSets/obama/facts/triples.hdt", hdtFilePath);
    copyResource("dataSets/obama/facts/triples.nt", ntFilePath);
    System.setProperty("stargraph.data.root-dir", root.toString());
    ConfigFactory.invalidateCaches();
    config = ConfigFactory.load().getConfig("stargraph");
}
 
开发者ID:Lambda-3,项目名称:Stargraph,代码行数:13,代码来源:FactProviderTest.java

示例4: before

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@BeforeClass
public void before() throws Exception {
    Path root = Files.createTempFile("stargraph-", "-dataDir");
    Path hdtPath = createPath(root, factsId).resolve("triples.hdt");
    copyResource("dataSets/obama/facts/triples.hdt", hdtPath);
    System.setProperty("stargraph.data.root-dir", root.toString());
    ConfigFactory.invalidateCaches();
    stargraph = new Stargraph();

    //TODO: replace with KBLoader#loadAll()
    loadProperties(stargraph);
    loadEntities(stargraph);
    loadFacts(stargraph);
}
 
开发者ID:Lambda-3,项目名称:Stargraph,代码行数:15,代码来源:ElasticIndexerIT.java

示例5: setup

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@BeforeTest
void setup() {

    originalOut = System.out;
    originalErr = System.err;

    System.setOut(new PrintStream(outContent));
    System.setErr(new PrintStream(errContent));

    asserted = true;

    System.setProperty("config.resource", "application-cli.local.conf");
    ConfigFactory.invalidateCaches();
}
 
开发者ID:Lambda-3,项目名称:Graphene,代码行数:15,代码来源:GrapheneCLITest.java

示例6: set

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
public void set(String value){
  if(value == null){
    System.clearProperty(property);
  } else {
    System.setProperty(property, value);
  }
  ConfigFactory.invalidateCaches();
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:9,代码来源:TestConfig.java

示例7: refreshConfig

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
public static void refreshConfig() {
    ConfigFactory.invalidateCaches();
    OcraftConfig.inject(ConfigFactory.load());
}
 
开发者ID:ocraft,项目名称:ocraft-s2client,代码行数:5,代码来源:Configs.java

示例8: close

import com.typesafe.config.ConfigFactory; //导入方法依赖的package包/类
@Override
public void close() {
  set(original);
  ConfigFactory.invalidateCaches();
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:6,代码来源:TestConfig.java


注:本文中的com.typesafe.config.ConfigFactory.invalidateCaches方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。