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

org.openstack4j.model.network.ext.LbMethod Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.model.network.ext;

import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * Load Balancer Algorithm
 * 
 * @author liujunpeng
 *
 */
public enum LbMethod {
    ROUND_ROBIN,
    LEAST_CONNECTIONS,
    SOURCE_IP;

    @JsonCreator
    public static LbMethod forValue(String value) {
        if (value != null)
        {
            for (LbMethod s : LbMethod.values()) {
                if (s.name().equalsIgnoreCase(value)) {
                    return s;
                }
            }
        }
        return LbMethod.ROUND_ROBIN;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy