Module org.elasticsearch.server
Enum Class SnapshotSortKey
java.lang.Object
java.lang.Enum<SnapshotSortKey>
org.elasticsearch.action.admin.cluster.snapshots.get.SnapshotSortKey
- All Implemented Interfaces:
Serializable,Comparable<SnapshotSortKey>,Constable
Sort key for snapshots e.g. returned from the get-snapshots API. All values break ties using
SnapshotInfo.snapshotId() (i.e. by
name).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSort by snapshot duration (end time minus start time).Sort by number of failed shards in the snapshot.Sort by number of indices in the snapshot.Sort by snapshot name.Sort by repository name.Sort by number of shards in the snapshot.Sort by snapshot start time. -
Method Summary
Modifier and TypeMethodDescriptionfinal Comparator<SnapshotInfo> getSnapshotInfoComparator(SortOrder sortOrder) static SnapshotSortKeytoString()static SnapshotSortKeyReturns the enum constant of this class with the specified name.static SnapshotSortKey[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
START_TIME
Sort by snapshot start time. -
NAME
Sort by snapshot name. -
DURATION
Sort by snapshot duration (end time minus start time). -
INDICES
Sort by number of indices in the snapshot. -
SHARDS
Sort by number of shards in the snapshot. -
FAILED_SHARDS
Sort by number of failed shards in the snapshot. -
REPOSITORY
Sort by repository name.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<SnapshotSortKey>
-
getSnapshotInfoComparator
- Returns:
- a
Comparatorwhich sortsSnapshotInfoinstances according to this sort key.
-
of
-