Examples of OCommandOutputListener


Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

    testDocumentTx = new ODatabaseDocumentTx("plocal:" + buildDir.getAbsolutePath() + "/testLocalPaginatedStorageRestoreFromTx");
    testDocumentTx.open("admin", "admin");
    testDocumentTx.close();

    ODatabaseCompare databaseCompare = new ODatabaseCompare(testDocumentTx.getURL(), baseDocumentTx.getURL(), "admin", "admin",
        new OCommandOutputListener() {
          @Override
          public void onMessage(String text) {
            System.out.println(text);
          }
        });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

          throw new ODatabaseException("Database named '" + name + "' already exists: ");
        } else {
          f.mkdirs();
          URL uri = new URL(url);
          URLConnection conn = uri.openConnection();
          OZIPCompressionUtil.uncompressDirectory(conn.getInputStream(), folder, new OCommandOutputListener() {
            @Override
            public void onMessage(String iText) {

            }
          });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

    testDocumentTx = new ODatabaseDocumentTx("plocal:" + buildDir.getAbsolutePath() + "/testLocalPaginatedStorageRestoreFromWAL");
    testDocumentTx.open("admin", "admin");
    testDocumentTx.close();

    ODatabaseCompare databaseCompare = new ODatabaseCompare(testDocumentTx.getURL(), baseDocumentTx.getURL(), "admin", "admin",
        new OCommandOutputListener() {
          @Override
          public void onMessage(String text) {
            System.out.println(text);
          }
        });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

    database.close();
    try {
      ODatabaseDocumentTx exportDatabase = new ODatabaseDocumentTx(url);
      exportDatabase.open("admin", "admin");

      OCommandOutputListener listener = new OCommandOutputListener() {
        @Override
        public void onMessage(String iText) {

        }
      };
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

      // Backup makes ZIP files
      File file = File.createTempFile("export-", ".zip", util.getTmpDir());
      log("Exporting to: {}", file);

      try (OutputStream output = new BufferedOutputStream(new FileOutputStream(file))) {
        OCommandOutputListener listener = new OCommandOutputListener()
        {
          @Override
          public void onMessage(final String text) {
            log("> {}", text.trim());
          }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

      ODocument doc = createPerson(db);

      file = File.createTempFile("export-", ".gz", util.getTmpDir());
      log("Exporting to: {}", file);

      ODatabaseExport exporter = new ODatabaseExport(db, file.getPath(), new OCommandOutputListener() {
        @Override
        public void onMessage(final String text) {
          log("> {}", text.trim());
        }
      });
      exporter.exportDatabase();
    }

    try (ODatabaseDocumentTx db = createDatabase("test2")) {
      log("Importing from: {}", file);

      ODatabaseImport importer = new ODatabaseImport(db, file.getPath(), new OCommandOutputListener() {
        @Override
        public void onMessage(final String text) {
          log("> {}", text.trim());
        }
      });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

      // Backup makes ZIP files
      File file = File.createTempFile("export-", ".zip", util.getTmpDir());
      log("Exporting to: {}", file);

      try (OutputStream output = new BufferedOutputStream(new FileOutputStream(file))) {
        OCommandOutputListener listener = new OCommandOutputListener()
        {
          @Override
          public void onMessage(final String text) {
            log("> {}", text.trim());
          }
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

  public static void exportData(String appcode,OutputStream os) throws UnableToExportDbException{
    ODatabaseRecordTx db = null;
    try{
      db = open(appcode, BBConfiguration.getBaasBoxAdminUsername(), BBConfiguration.getBaasBoxAdminPassword());
     
      ODatabaseExport oe = new ODatabaseExport(db, os, new OCommandOutputListener() {
        @Override
        public void onMessage(String m) {
          Logger.info(m);
        }
      });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

      Logger.info("...drop the O-Classes...");
      db.getMetadata().getSchema().dropClass("OFunction");
       db.getMetadata().getSchema().dropClass("OSchedule");
       db.getMetadata().getSchema().dropClass("ORIDs");
         ODatabaseDocumentTx dbd = new ODatabaseDocumentTx(db);
      ODatabaseImport oi = new ODatabaseImport(dbd, f.getAbsolutePath(), new OCommandOutputListener() {
        @Override
        public void onMessage(String m) {
          Logger.info("Restore db: " + m);
        }
      });
View Full Code Here

Examples of com.orientechnologies.orient.core.command.OCommandOutputListener

               db.setProperty(ODatabase.OPTIONS.SECURITY.toString(), Boolean.FALSE);
               db.open("admin", "aaa");

               final long begin = System.currentTimeMillis();

               db.backup(new FileOutputStream(exportFilePath), null, null, new OCommandOutputListener() {
                 @Override
                 public void onMessage(String iText) {
                   OLogManager.instance().info(this, iText);
                 }
               }, compressionLevel, bufferSize);
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.