public enum MigrationStage extends java.lang.Enum<MigrationStage>
Off DualWrite Shadow Live RampDown Complete
Enum Constant and Description |
---|
COMPLETE
Complete - migration is done
|
DUAL_WRITE
DualWrite - write to both "old" and "new", "old" is authoritative for reads
|
LIVE
Live - both "new" and "old" versions run with a preference for "new"
|
OFF
Off - migration hasn't started, "old" is authoritative for reads and writes
|
RAMP_DOWN
RampDown - only read from "new", write to "old" and "new"
|
SHADOW
Shadow - both "new" and "old" versions run with a preference for "old"
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isStage(java.lang.String strValue)
Check if the provided string is a migration stage.
|
static MigrationStage |
of(java.lang.String strValue,
MigrationStage defaultStage)
Convert a string into a migration stage.
|
java.lang.String |
toString() |
static MigrationStage |
valueOf(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.
|
public static final MigrationStage OFF
public static final MigrationStage DUAL_WRITE
public static final MigrationStage SHADOW
public static final MigrationStage LIVE
public static final MigrationStage RAMP_DOWN
public static final MigrationStage COMPLETE
public static MigrationStage[] values()
for (MigrationStage c : MigrationStage.values()) System.out.println(c);
public static MigrationStage valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<MigrationStage>
public static boolean isStage(java.lang.String strValue)
strValue
- The string to check.public static MigrationStage of(java.lang.String strValue, MigrationStage defaultStage)
If the string is not a stage, then the provided default will be returned.
strValue
- The string to convert.defaultStage
- The default value to use if the string does not represent a migration stage.