/** * Close the delegate graph. */ public void close() { delegate.shutdown(); }
@Override public void close() { this.graph.shutdown(); }
@Override public void shutdown() { graph.shutdown(); }
public void shutdown() { this.baseGraph.shutdown(); }
public void shutdown() { this.baseGraph.shutdown(); }
public void shutdown() { config.getConfiguredGraph().shutdown(); }
public void shutdown() { config.getConfiguredGraph().shutdown(); }
public void shutdown() { try { this.baseGraph.shutdown(); // TODO: hmmmmmm?? this.trigger.fireEventQueue(); this.trigger.resetEventQueue(); } catch (Exception re) { } }
@Override public void stop() { // need to shutdown all the graphs that were started with the web server for (RexsterApplicationGraph rag : this.graphs.values()) { final Graph graph = rag.getGraph(); logger.info(String.format("Shutting down [%s] - [%s]", rag.getGraphName(), graph)); // graph may not have been initialized properly if an exception gets tossed in // on graph creation if (graph != null) { // call shutdown on the unwrapped graph as some wrappers don't allow shutdown() to be called. final Graph shutdownGraph = rag.getUnwrappedGraph(); shutdownGraph.shutdown(); } } }
@Override public void cleanup(final Mapper<NullWritable, FaunusVertex, LongWritable, Holder<FaunusVertex>>.Context context) throws IOException, InterruptedException { if (this.graph instanceof TransactionalGraph) { try { ((TransactionalGraph) this.graph).commit(); context.getCounter(Counters.SUCCESSFUL_TRANSACTIONS).increment(1l); } catch (Exception e) { LOGGER.error("Could not commit transaction during VertexMap.cleanup():", e); ((TransactionalGraph) this.graph).rollback(); context.getCounter(Counters.FAILED_TRANSACTIONS).increment(1l); throw new IOException(e.getMessage(), e); } } this.graph.shutdown(); }
@Override public void cleanup(final Mapper<NullWritable, FaunusVertex, NullWritable, FaunusVertex>.Context context) throws IOException, InterruptedException { if (this.graph instanceof TransactionalGraph) { try { ((TransactionalGraph) this.graph).commit(); context.getCounter(Counters.SUCCESSFUL_TRANSACTIONS).increment(1l); } catch (Exception e) { LOGGER.error("Could not commit transaction during EdgeMap.cleanup():", e); ((TransactionalGraph) this.graph).rollback(); context.getCounter(Counters.FAILED_TRANSACTIONS).increment(1l); throw new IOException(e.getMessage(), e); } } this.graph.shutdown(); }
graph.shutdown();
public void testVertexEdgesWithNonVisibleVertexOnOtherEnd() { Graph graph = graphTest.generateGraph(); if (!(graph instanceof VertexiumBlueprintsGraph)) { throw new RuntimeException("Invalid graph"); } org.vertexium.Graph vertexiumGraph = ((VertexiumBlueprintsGraph) graph).getGraph(); Authorizations aAuthorizations = vertexiumGraph.createAuthorizations("a"); org.vertexium.Vertex v1 = vertexiumGraph.addVertex("v1", new Visibility(""), aAuthorizations); org.vertexium.Vertex v2 = vertexiumGraph.addVertex("v2", new Visibility("a"), aAuthorizations); org.vertexium.Vertex v3 = vertexiumGraph.addVertex("v3", new Visibility(""), aAuthorizations); vertexiumGraph.addEdge("e1to2", v1, v2, "label", new Visibility(""), aAuthorizations); vertexiumGraph.addEdge("e1to3", v1, v3, "label", new Visibility(""), aAuthorizations); vertexiumGraph.flush(); Vertex blueV1 = graph.getVertex("v1"); assertEquals(1, count(blueV1.getEdges(Direction.BOTH, "label"))); assertEquals(1, count(blueV1.getVertices(Direction.BOTH, "label"))); assertEquals(1, count((Iterable) blueV1.query().direction(Direction.BOTH).vertexIds())); graph.shutdown(); } }