Package google.registry.model.common
Enum DatabaseMigrationStateSchedule.MigrationState
- java.lang.Object
-
- java.lang.Enum<DatabaseMigrationStateSchedule.MigrationState>
-
- google.registry.model.common.DatabaseMigrationStateSchedule.MigrationState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DatabaseMigrationStateSchedule.MigrationState>
- Enclosing class:
- DatabaseMigrationStateSchedule
public static enum DatabaseMigrationStateSchedule.MigrationState extends java.lang.Enum<DatabaseMigrationStateSchedule.MigrationState>
The current phase of the migration plus information about which database to use and whether or not the phase is read-only.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATASTORE_ONLY
Datastore is the only DB being used.DATASTORE_PRIMARY
Datastore is the primary DB, with changes replicated to Cloud SQL.DATASTORE_PRIMARY_NO_ASYNC
Datastore is the primary DB, with replication, and async actions are disallowed.DATASTORE_PRIMARY_READ_ONLY
Datastore is the primary DB, with replication, and all mutating actions are disallowed.SEQUENCE_BASED_ALLOCATE_ID
Toggles SQL Sequence based allocateIdSQL_ONLY
Cloud SQL is the only DB being used.SQL_PRIMARY
Cloud SQL is the primary DB, with changes replicated to Datastore.SQL_PRIMARY_READ_ONLY
Cloud SQL is the primary DB, with replication back to Datastore, and all mutating actions are disallowed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DatabaseMigrationStateSchedule.PrimaryDatabase
getPrimaryDatabase()
DatabaseMigrationStateSchedule.ReplayDirection
getReplayDirection()
boolean
isReadOnly()
static DatabaseMigrationStateSchedule.MigrationState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DatabaseMigrationStateSchedule.MigrationState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATASTORE_ONLY
public static final DatabaseMigrationStateSchedule.MigrationState DATASTORE_ONLY
Datastore is the only DB being used.
-
DATASTORE_PRIMARY
public static final DatabaseMigrationStateSchedule.MigrationState DATASTORE_PRIMARY
Datastore is the primary DB, with changes replicated to Cloud SQL.
-
DATASTORE_PRIMARY_NO_ASYNC
public static final DatabaseMigrationStateSchedule.MigrationState DATASTORE_PRIMARY_NO_ASYNC
Datastore is the primary DB, with replication, and async actions are disallowed.
-
DATASTORE_PRIMARY_READ_ONLY
public static final DatabaseMigrationStateSchedule.MigrationState DATASTORE_PRIMARY_READ_ONLY
Datastore is the primary DB, with replication, and all mutating actions are disallowed.
-
SQL_PRIMARY_READ_ONLY
public static final DatabaseMigrationStateSchedule.MigrationState SQL_PRIMARY_READ_ONLY
Cloud SQL is the primary DB, with replication back to Datastore, and all mutating actions are disallowed.
-
SQL_PRIMARY
public static final DatabaseMigrationStateSchedule.MigrationState SQL_PRIMARY
Cloud SQL is the primary DB, with changes replicated to Datastore.
-
SQL_ONLY
public static final DatabaseMigrationStateSchedule.MigrationState SQL_ONLY
Cloud SQL is the only DB being used.
-
SEQUENCE_BASED_ALLOCATE_ID
public static final DatabaseMigrationStateSchedule.MigrationState SEQUENCE_BASED_ALLOCATE_ID
Toggles SQL Sequence based allocateId
-
-
Method Detail
-
values
public static DatabaseMigrationStateSchedule.MigrationState[] 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 (DatabaseMigrationStateSchedule.MigrationState c : DatabaseMigrationStateSchedule.MigrationState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DatabaseMigrationStateSchedule.MigrationState 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
-
getPrimaryDatabase
public DatabaseMigrationStateSchedule.PrimaryDatabase getPrimaryDatabase()
-
isReadOnly
public boolean isReadOnly()
-
getReplayDirection
public DatabaseMigrationStateSchedule.ReplayDirection getReplayDirection()
-
-