Package com.google.gerrit.server.notedb
Enum NotesMigrationState
- java.lang.Object
-
- java.lang.Enum<NotesMigrationState>
-
- com.google.gerrit.server.notedb.NotesMigrationState
-
- All Implemented Interfaces:
Serializable
,Comparable<NotesMigrationState>
public enum NotesMigrationState extends Enum<NotesMigrationState>
Possible high-level states of the NoteDb migration for changes.This class describes the series of states required to migrate a site from ReviewDb-only to NoteDb-only. This process has several steps, and covers only a small subset of the theoretically possible combinations of
NotesMigration
return values.These states are ordered: a one-way migration from ReviewDb to NoteDb will pass through states in the order in which they are defined.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOTE_DB
READ_WRITE_NO_SEQUENCE
READ_WRITE_WITH_SEQUENCE_NOTE_DB_PRIMARY
READ_WRITE_WITH_SEQUENCE_REVIEW_DB_PRIMARY
REVIEW_DB
WRITE
-
Field Summary
Fields Modifier and Type Field Description static NotesMigrationState
FINAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<NotesMigrationState>
forConfig(org.eclipse.jgit.lib.Config cfg)
static Optional<NotesMigrationState>
forNotesMigration(NotesMigration migration)
void
setConfigValues(org.eclipse.jgit.lib.Config cfg)
String
toText()
static NotesMigrationState
valueOf(String name)
Returns the enum constant of this type with the specified name.static NotesMigrationState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REVIEW_DB
public static final NotesMigrationState REVIEW_DB
-
WRITE
public static final NotesMigrationState WRITE
-
READ_WRITE_NO_SEQUENCE
public static final NotesMigrationState READ_WRITE_NO_SEQUENCE
-
READ_WRITE_WITH_SEQUENCE_REVIEW_DB_PRIMARY
public static final NotesMigrationState READ_WRITE_WITH_SEQUENCE_REVIEW_DB_PRIMARY
-
READ_WRITE_WITH_SEQUENCE_NOTE_DB_PRIMARY
public static final NotesMigrationState READ_WRITE_WITH_SEQUENCE_NOTE_DB_PRIMARY
-
NOTE_DB
public static final NotesMigrationState NOTE_DB
-
-
Field Detail
-
FINAL
public static final NotesMigrationState FINAL
-
-
Method Detail
-
values
public static NotesMigrationState[] 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 (NotesMigrationState c : NotesMigrationState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NotesMigrationState valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
forConfig
public static Optional<NotesMigrationState> forConfig(org.eclipse.jgit.lib.Config cfg)
-
forNotesMigration
public static Optional<NotesMigrationState> forNotesMigration(NotesMigration migration)
-
setConfigValues
public void setConfigValues(org.eclipse.jgit.lib.Config cfg)
-
toText
public String toText()
-
-