All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.schedulerx.worker.container.ShutdownMode Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
package com.alibaba.schedulerx.worker.container;


/**
 * ShutdownMode
 * @author yaohui
 * @create 2023/7/13 8:19 PM
 **/
public enum ShutdownMode {

    WAIT_ALL(0), WAIT_RUNNING(1), IMMEDIATE(2),
    ;

    private int value;

    ShutdownMode(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static ShutdownMode parseValue(int value) {
        ShutdownMode[] list = ShutdownMode.values();
        for (ShutdownMode s : list) {
            if (s.getValue() == value) {
                return s;
            }
        }
        throw new IllegalArgumentException("ShutdownMode value is invalid. value:" + value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy