Package com.orientechnologies.orient.client.remote

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.connect()


    }
  }

  private void dropDatabase() throws IOException {
    OServerAdmin admin = new OServerAdmin("remote:localhost/test");
    admin.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
    admin.dropDatabase("plocal");
  }

  private void createDatabase() throws IOException {
    OServerAdmin admin = new OServerAdmin("remote:localhost/test");
View Full Code Here


    admin.dropDatabase("plocal");
  }

  private void createDatabase() throws IOException {
    OServerAdmin admin = new OServerAdmin("remote:localhost/test");
    admin.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
    admin.createDatabase("document", "plocal");
  }

  @Test
  public void createBinaryDatabaseConnectCsv() throws IOException {
View Full Code Here

  }

  public static void freezeDatabase(final ODatabase database) throws IOException {
    if (database.getURL().startsWith("remote")) {
      final OServerAdmin serverAdmin = new OServerAdmin(database.getURL());
      serverAdmin.connect("root", getServerRootPassword()).freezeDatabase("plocal");
      serverAdmin.close();
    } else {
      database.freeze();
    }
  }
View Full Code Here

  }

  public static void releaseDatabase(final ODatabase database) throws IOException {
    if (database.getURL().startsWith("remote")) {
      final OServerAdmin serverAdmin = new OServerAdmin(database.getURL());
      serverAdmin.connect("root", getServerRootPassword()).releaseDatabase("plocal");
      serverAdmin.close();
    } else {
      database.release();
    }
  }
View Full Code Here

  }

  @Test
  public void testDbList() throws IOException {
    OServerAdmin server = new OServerAdmin(serverURL);
    server.connect("root", ODatabaseHelper.getServerRootPassword());
    Map<String, String> dbs = server.listDatabases();
    Assert.assertFalse(dbs.isEmpty());
  }
}
View Full Code Here

      }
    }

    try {
      final OServerAdmin serverAdmin = new OServerAdmin(url);
      serverAdmin.connect("root", "root");
      if (!serverAdmin.existsDatabase(OrientGraphTest.getStorageType()))
        serverAdmin.createDatabase("graph", OrientGraphTest.getStorageType());

      serverAdmin.close();
View Full Code Here

      final OrientGraphFactory factory = graphFactories.remove(url);
      if (factory != null)
        factory.close();

      final OServerAdmin serverAdmin = new OServerAdmin(url);
      serverAdmin.connect("root", "root");

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType()))
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());

      serverAdmin.close();
View Full Code Here

  @Before
  public void setUp() throws IOException {
    if (DB_URL.startsWith("remote:")) {
      OServerAdmin serverAdmin = new OServerAdmin(DB_URL);
      serverAdmin.connect("root", ODatabaseHelper.getServerRootPassword());

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType())) {
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());
      }
      serverAdmin.createDatabase(DB_URL, "graph", OrientGraphTest.getStorageType());
View Full Code Here

  @AfterClass
  public static void afterClass() throws IOException {
    if (DB_URL.startsWith("remote:")) {
      OServerAdmin serverAdmin = new OServerAdmin(DB_URL);
      serverAdmin.connect("root", ODatabaseHelper.getServerRootPassword());

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType())) {
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());
      }
    } else {
View Full Code Here

        return graph;
    }

    try {
      final OServerAdmin serverAdmin = new OServerAdmin(url);
      serverAdmin.connect("root", "root");
      if (!serverAdmin.existsDatabase(OrientGraphTest.getStorageType()))
        serverAdmin.createDatabase("graph", OrientGraphTest.getStorageType());

      serverAdmin.close();
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.