Package com.tinkerpop.blueprints.impls.orient

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


      final OrientVertex product;
      final OrientVertex fishing;

      OrientBaseGraph graph = localFactory.getTx();
      try {
        product = graph.addVertex("class:Product");

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


      OrientBaseGraph graph = localFactory.getTx();
      try {
        product = graph.addVertex("class:Product");

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

        OrientGraphFactory factory = new OrientGraphFactory("plocal:target/server" + i + "/databases/" + getDatabaseName());
        graph = factory.getNoTx();
        try {

          vertices[i] = graph.addVertex("class:Client");

          final int clId = vertices[i].getIdentity().getClusterId();

          if (i == 0)
            Assert.assertEquals("Error on assigning cluster client", clId, graph.getRawGraph().getClusterIdByName("client"));
View Full Code Here

    counter.set(0);
    startedOn = System.currentTimeMillis();

    OrientBaseGraph graphPool = new OrientGraph(url);

    OrientVertex superNode = graphPool.addVertex(null, "optimisticSuperNode", true);
    graphPool.commit();

    OptimisticThread[] ops = new OptimisticThread[THREADS];
    for (int i = 0; i < THREADS; ++i)
      ops[i] = new OptimisticThread(url, superNode, i, "thread" + i);
View Full Code Here

    startedOn = System.currentTimeMillis();

    OrientBaseGraph graphPool = new OrientGraph(url);

    graphPool.setThreadMode(OrientBaseGraph.THREAD_MODE.ALWAYS_AUTOSET);
    OrientVertex superNode = graphPool.addVertex(null, "pessimisticSuperNode", true);
    graphPool.commit();

    PessimisticThread[] ops = new PessimisticThread[THREADS];
    for (int i = 0; i < THREADS; ++i)
      ops[i] = new PessimisticThread(url, superNode, i, "thread" + i);
View Full Code Here

                  break;
              }
            }
          }

          v = g.addVertex(id, prop);

          // System.out.printf("\nCreated vertex key=%d, v=%s", id, v);

          verticesCreated.incrementAndGet();
View Full Code Here

    return new OrientVertexFuture(Orient.instance().getWorkers().submit(new Callable<OrientVertex>() {
      @Override
      public OrientVertex call() throws Exception {
        final OrientBaseGraph g = acquire();
        try {
          OrientVertex v = g.addVertex(id, prop);

          verticesCreated.incrementAndGet();

          return v;
View Full Code Here

    try {
      OrientVertex v = getFromCache(id);
      if (v != null)
        return v;

      v = g.addVertex(id);

      verticesCreated.incrementAndGet();

      return v;
View Full Code Here

    return new OrientVertexFuture(Orient.instance().getWorkers().submit(new Callable<OrientVertex>() {
      @Override
      public OrientVertex call() throws Exception {
        final OrientBaseGraph g = acquire();
        try {
          final OrientVertex v = g.addVertex(id);

          verticesCreated.incrementAndGet();

          return v;
        } finally {
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.