Package com.launchdarkly.sdk.server
Enum MigrationStage
- java.lang.Object
-
- java.lang.Enum<MigrationStage>
-
- com.launchdarkly.sdk.server.MigrationStage
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MigrationStage>
public enum MigrationStage extends java.lang.Enum<MigrationStage>
Stage denotes one of six possible stages a technology migration could be a part of, progressing through the following order.Off DualWrite Shadow Live RampDown Complete
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLETEComplete - migration is doneDUAL_WRITEDualWrite - write to both "old" and "new", "old" is authoritative for readsLIVELive - both "new" and "old" versions run with a preference for "new"OFFOff - migration hasn't started, "old" is authoritative for reads and writesRAMP_DOWNRampDown - only read from "new", write to "old" and "new"SHADOWShadow - both "new" and "old" versions run with a preference for "old"
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisStage(java.lang.String strValue)Check if the provided string is a migration stage.static MigrationStageof(java.lang.String strValue, MigrationStage defaultStage)Convert a string into a migration stage.java.lang.StringtoString()static MigrationStagevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MigrationStage[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final MigrationStage OFF
Off - migration hasn't started, "old" is authoritative for reads and writes
-
DUAL_WRITE
public static final MigrationStage DUAL_WRITE
DualWrite - write to both "old" and "new", "old" is authoritative for reads
-
SHADOW
public static final MigrationStage SHADOW
Shadow - both "new" and "old" versions run with a preference for "old"
-
LIVE
public static final MigrationStage LIVE
Live - both "new" and "old" versions run with a preference for "new"
-
RAMP_DOWN
public static final MigrationStage RAMP_DOWN
RampDown - only read from "new", write to "old" and "new"
-
COMPLETE
public static final MigrationStage COMPLETE
Complete - migration is done
-
-
Method Detail
-
values
public static MigrationStage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MigrationStage c : MigrationStage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MigrationStage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<MigrationStage>
-
isStage
public static boolean isStage(java.lang.String strValue)
Check if the provided string is a migration stage.- Parameters:
strValue- The string to check.- Returns:
- True if the string represents a migration stage.
-
of
public static MigrationStage of(java.lang.String strValue, MigrationStage defaultStage)
Convert a string into a migration stage.If the string is not a stage, then the provided default will be returned.
- Parameters:
strValue- The string to convert.defaultStage- The default value to use if the string does not represent a migration stage.- Returns:
- The converted migration stage.
-
-