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

com.jelastic.api.system.persistence.ScalingMode Maven / Gradle / Ivy

The newest version!
/*Server class MD5: 8057ed17b61fe4f39f72f24e265d4dfb*/
package com.jelastic.api.system.persistence;

import com.jelastic.api.system.service.utils.NodeUtils;

/**
 * @name Jelastic API Client
 * @version 8.11.2
 * @copyright Jelastic, Inc.
 */
public enum ScalingMode {

    STATELESS, STATEFUL;

    public static ScalingMode getDefaultByNodeMission(String nodeMission) {
        if (NodeUtils.NODE_MISSION_BALANCER.equalsIgnoreCase(nodeMission) || NodeUtils.NODE_MISSION_COMPUTE.equalsIgnoreCase(nodeMission) || NodeUtils.NODE_MISSION_VDS.equalsIgnoreCase(nodeMission)) {
            return STATEFUL;
        }
        return STATELESS;
    }

    public static String availableValues() {
        String availableValues = "";
        for (ScalingMode value : values()) {
            availableValues += " " + value.toString() + ",";
        }
        return availableValues.substring(0, availableValues.length() - 1);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy