Package com.zeroturnaround.liverebel.api.update

Examples of com.zeroturnaround.liverebel.api.update.ConfigurableUpdate


    }
  }

  private static void updateUsingRollingRestart(CommandCenter center, Collection<String> serverIds, String centerAddress, String version, String appName) {
    // get update configuration for updating application with id "lr-demo" to version "ver2"
    ConfigurableUpdate update = center.update(appName, version);
    // use rolling restart (needs at least 2 servers) with custom timeout
    update
        // use rolling restart instead of offline restart or hotpaching
        .enableRolling()
        // seconds - how long to wait for session drain (in production you would probably like to wait about 1h to allow existing users to continue using old version)
        .withTimeout(30)
        .on(serverIds); // update only given servers - null means all servers
    // start update
    log.info("Starting to update application '{}' with rolling restart to '{}' - " +
        "this takes time proportinally to session drain timeout - to follow the progress, open browser at {}",
        appName, version, centerAddress);
    update.execute();
    log.info("Servers are now updated");
  }
View Full Code Here

TOP

Related Classes of com.zeroturnaround.liverebel.api.update.ConfigurableUpdate

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.