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

Alachisoft.NCache.Common.DataStructures.StateTransferStatus Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
package Alachisoft.NCache.Common.DataStructures;

/**
 * This enum represents the status of the state transfer.
 */

public enum StateTransferStatus {

    /**
     * State transfer has not started yet.
     */
    NEEED_STATE_TRANSFER(1),
    /**
     * State transfer is in progress.
     */
    UNDER_STATE_TRANSFER(2),
    /**
     * State transfer has completed.
     */
    STATE_TRANSFER_COMPLETED(3),
    /**
     * State Transfer is not required as source cache is not bridge coordinator cache.
     */
    NO_NEED_FOR_STATE_TRANSFER(4);

    private static java.util.HashMap mappings;
    private int intValue;
    private StateTransferStatus(int value) {
        intValue = value;
        StateTransferStatus.getMappings().put(value, this);
    }

    private static java.util.HashMap getMappings() {
        if (mappings == null) {
            synchronized (StateTransferStatus.class) {
                if (mappings == null) {
                    mappings = new java.util.HashMap();
                }
            }
        }
        return mappings;
    }

    public static StateTransferStatus forValue(int value) {
        return getMappings().get(value);
    }

    public int getValue() {
        return intValue;
    }

    public class ReplicatedStateTransferStatus {
        /**
         * State transfer is in progress.
         */
        public static final int UNDER_STATE_TRANSFER = 1;

        /**
         * State transfer has completed.
         */
        public static final int STATE_TRANSFER_COMPLETED = 2;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy