/** * Restart the container unless it has been stopped */ public static RestartPolicy unlessStoppedRestart() { return new RestartPolicy(0, "unless-stopped"); }
/** * Restart the container if it exits with a non-zero exit code. * * @param maximumRetryCount * the maximum number of restarts. Set to <code>0</code> for unlimited retries. */ public static RestartPolicy onFailureRestart(int maximumRetryCount) { return new RestartPolicy(maximumRetryCount, "on-failure"); }
/** * Do not restart the container if it dies. (default) */ public static RestartPolicy noRestart() { return new RestartPolicy(); }
/** * Always restart the container no matter what exit code is returned. */ public static RestartPolicy alwaysRestart() { return new RestartPolicy(0, "always"); }
/** * Do not restart the container if it dies. (default) */ public static RestartPolicy noRestart() { return new RestartPolicy(); }
/** * Always restart the container no matter what exit code is returned. */ public static RestartPolicy alwaysRestart() { return new RestartPolicy(0, "always"); }
/** * Restart the container if it exits with a non-zero exit code. * * @param maximumRetryCount * the maximum number of restarts. Set to <code>0</code> for unlimited retries. */ public static RestartPolicy onFailureRestart(int maximumRetryCount) { return new RestartPolicy(maximumRetryCount, "on-failure"); }
/** * Restart the container unless it has been stopped */ public static RestartPolicy unlessStoppedRestart() { return new RestartPolicy(0, "unless-stopped"); }