Alachisoft.NCache.Common.DataStructures.StateTransferStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-common Show documentation
Show all versions of nc-common Show documentation
Internal package of Alachisoft.
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;
}
}