org.vertexium.Graph.shutdown()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.vertexium.Graph.shutdown()方法的一些代码示例,展示了Graph.shutdown()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.shutdown()方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:shutdown

Graph.shutdown介绍

[英]Cleans up or disconnects from the underlying storage.
[中]清理或断开与基础存储的连接。

代码示例

代码示例来源:origin: org.visallo/visallo-core

@Override
  public void shutdown() {
    this.graph.shutdown();
  }
}

代码示例来源:origin: org.vertexium/vertexium-test

@After
public void after() throws Exception {
  if (graph != null) {
    graph.shutdown();
    graph = null;
  }
}

代码示例来源:origin: org.vertexium/vertexium-blueprints

@Override
public void shutdown() {
  getGraph().shutdown();
}

代码示例来源:origin: visallo/vertexium

@After
public void after() throws Exception {
  if (graph != null) {
    graph.shutdown();
    graph = null;
  }
}

代码示例来源:origin: org.visallo/visallo-tools-migration-core

@Override
protected final int run() throws Exception {
  graph = getGraph();
  try {
    Object visalloGraphVersionObj = graph.getMetadata(GRAPH_METADATA_VISALLO_GRAPH_VERSION_KEY);
    if (visalloGraphVersionObj == null) {
      throw new VisalloException("No graph metadata version set");
    } else if (visalloGraphVersionObj instanceof Integer) {
      Integer visalloGraphVersion = (Integer) visalloGraphVersionObj;
      if (getFinalGraphVersion().equals(visalloGraphVersion)) {
        throw new VisalloException("Migration has already completed. Graph version: " + visalloGraphVersion);
      } else if (!getNeededGraphVersion().equals(visalloGraphVersion)) {
        throw new VisalloException("Migration can only run from version " + getNeededGraphVersion() +
            ". Current graph version = " + visalloGraphVersion);
      }
    } else {
      throw new VisalloException("Unexpected value for graph version: " + visalloGraphVersionObj);
    }
    if (migrate(graph)) {
      graph.setMetadata(GRAPH_METADATA_VISALLO_GRAPH_VERSION_KEY, getFinalGraphVersion());
    }
    graph.flush();
    afterMigrate(graph);
    return 0;
  } finally {
    graph.shutdown();
  }
}

相关文章