Package com.tinkerpop.blueprints.impls.orient

Examples of com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown()


        product = graph.addVertex("class:Product");

        fishing = graph.addVertex("class:Hobby");
        fishing.setProperty("name", "Fishing");
      } finally {
        graph.shutdown();
      }

      vertices = new OrientVertex[serverInstance.size()];
      for (int i = 0; i < vertices.length; ++i) {
        final String nodeName = serverInstance.get(i).getServerInstance().getDistributedManager().getLocalNodeName();
View Full Code Here


          // CREATE A REGULAR EDGE
          final Edge edge = vertices[i].addEdge("Buy", product, new Object[] { "price", 1000 * i });

        } finally {
          graph.shutdown();
        }
      }

      for (int i = 0; i < vertices.length; ++i)
        System.out.println("Created vertex " + i + ": " + vertices[i].getRecord());
View Full Code Here

          Assert.assertTrue(result.iterator().hasNext());
          OrientEdge e2 = result.iterator().next();
          Assert.assertEquals(e2.getProperty("real"), true);

        } finally {
          graph.shutdown();
        }
      }

      // FOR ALL THE DATABASES QUERY THE SINGLE CLUSTER TO TEST ROUTING
      for (int server = 0; server < vertices.length; ++server) {
View Full Code Here

            final Iterable<Edge> boughtE = v.getEdges(Direction.OUT, "Buy");
            Assert.assertNotNull(boughtE.iterator().next().getProperty("price"));
          }
        } finally {
          graph.shutdown();
        }
      }

      // TEST DISTRIBUTED QUERY + AGGREGATION + SUB_QUERY AGAINST ALL 3 DATABASES TO TEST MAP/REDUCE
      for (int server = 0; server < vertices.length; ++server) {
View Full Code Here

    OrientVertex loadedSuperNode = graphPool.getVertex(superNode.getIdentity());

    for (int i = 0; i < THREADS; ++i)
      Assert.assertEquals(loadedSuperNode.countEdges(Direction.IN), OPTIMISTIC_CYCLES * THREADS);

    graphPool.shutdown();

    System.out.println("ConcurrentSQLBatchUpdateSuperNodeTest Optimistic Test completed in "
        + (System.currentTimeMillis() - startedOn));
  }

View Full Code Here

    OrientVertex loadedSuperNode = graphPool.getVertex(superNode.getIdentity());

    for (int i = 0; i < THREADS; ++i)
      Assert.assertEquals(loadedSuperNode.countEdges(Direction.IN), PESSIMISTIC_CYCLES * THREADS);

    graphPool.shutdown();

    System.out.println("ConcurrentSQLBatchUpdateSuperNodeTest Pessimistic Test completed in "
        + (System.currentTimeMillis() - startedOn));
  }
}
View Full Code Here

          verticesCreated.incrementAndGet();

          return v;
        } finally {
          g.shutdown();
          endAsynchOperation();
        }
      }
    }));
  }
View Full Code Here

      }

      return v;

    } finally {
      g.shutdown();
    }
  }

  @Override
  public void removeVertex(final Vertex vertex) {
View Full Code Here

          g.removeVertex(vertex);

          verticesRemoved.incrementAndGet();
        } finally {
          g.shutdown();
          endAsynchOperation();
        }
        return null;
      }
    });
View Full Code Here

  public Iterable<Vertex> getVertices() {
    final OrientBaseGraph g = acquire();
    try {
      return g.getVertices();
    } finally {
      g.shutdown();
    }
  }

  @Override
  public Iterable<Vertex> getVertices(final String key, final Object value) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.