Module org.elasticsearch.server
Record Class After
java.lang.Object
java.lang.Record
org.elasticsearch.action.admin.cluster.snapshots.get.After
- All Implemented Interfaces:
Writeable
public record After(String value, String repoName, String snapshotName)
extends Record
implements Writeable
Cursor value for the
?after pagination parameter of the get-snapshots API. Encodes the sort key value plus snapshot and
repository names for tiebreaking. Can be decoded from a query param and passed in a GetSnapshotsRequest, and used by
AfterPredicates to filter out snapshots that are not after this cursor.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AfterdecodeAfterQueryParam(String param) Decode the?afterquery parameter into anAfterinstance.final booleanIndicates whether some other object is "equal to" this one.static AfterfromSnapshotInfo(SnapshotInfo snapshotInfo, SnapshotSortKey sortBy) Build anAftercursor from the last snapshot in a page, for use when building the?aftervalue for the next request.final inthashCode()Returns a hash code value for this object.repoName()Returns the value of therepoNamerecord component.Returns the value of thesnapshotNamerecord component.Encode this cursor as the?afterquery parameter value (base64url-encoded "value,repoName,snapshotName").final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
After
- Throws:
IOException
-
After
Creates an instance of aAfterrecord class.- Parameters:
value- the value for thevaluerecord componentrepoName- the value for therepoNamerecord componentsnapshotName- the value for thesnapshotNamerecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
fromSnapshotInfo
Build anAftercursor from the last snapshot in a page, for use when building the?aftervalue for the next request.- Parameters:
snapshotInfo- the snapshot (typically the last in the current page)sortBy- the sort key used for the request- Returns:
- the cursor
-
toQueryParam
Encode this cursor as the?afterquery parameter value (base64url-encoded "value,repoName,snapshotName").- Returns:
- the encoded string for use as the
afterquery parameter
-
decodeAfterQueryParam
Decode the?afterquery parameter into anAfterinstance.- Parameters:
param- the value of theafterquery parameter (base64url-encoded "value,repoName,snapshotName")- Returns:
- the decoded cursor
- Throws:
IllegalArgumentException- if the parameter format is invalid
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
repoName
Returns the value of therepoNamerecord component.- Returns:
- the value of the
repoNamerecord component
-
snapshotName
Returns the value of thesnapshotNamerecord component.- Returns:
- the value of the
snapshotNamerecord component
-