Package com.metadot.book.connectr.server.migrations

Examples of com.metadot.book.connectr.server.migrations.Migration


      Class<?> [] classParm = null;
      Object [] objectParm = null;
      Class<?> cl = Class.forName(migration);
      java.lang.reflect.Constructor<?> co = cl.getConstructor(classParm);
      // there will be a cast exception if the object does not implement Migration
      Migration mg = (Migration) co.newInstance(objectParm);

      // call the 'migrate_up' or down method as appropriate,
      // which every class of type Migration must support.
      if (direction.equals("down")) {
        logger.info("migrating down: " + mg);
        res = mg.migrate_down(cursor, range, params);
        cursor = res.get("cursor");
      }
      else {
        logger.info("migrating up: " + mg);
        res = mg.migrate_up(cursor, range, params);
        cursor = res.get("cursor");
      }
      if (cursor != null) {
        Queue queue = QueueFactory.getDefaultQueue();
        TaskOptions topt = TaskOptions.Builder.url("/migration");
View Full Code Here

TOP

Related Classes of com.metadot.book.connectr.server.migrations.Migration

Copyright © 2018 www.massapicom. 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.