Skip to content

Commit

Permalink
docs: add class javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-campagna committed Jan 17, 2025
1 parent 5a0fe96 commit b14c9dc
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@

import static org.elasticsearch.rest.RestRequest.Method.PUT;

/**
* This class implements a REST API for adding a retention lease to a shard in Elasticsearch.
* Retention leases ensure that specific sequence numbers are retained, even as the global checkpoint
* advances during indexing. This guarantees seq_no values availability until the retention lease is
* removed.
*
* The API supports adding retention leases to indices, data streams, and index aliases. For data streams
* or aliases, the first backing index or underlying index is identified, and the retention lease is added
* to its shard.
*
* **Note:** This REST API is available only in Elasticsearch snapshot builds and is intended solely
* for benchmarking purposes, such as benchmarking operations like the shard changes API in Rally tracks.
* It is not intended for use in production environments.
*
* The response provides details about the added retention lease, including the target index,
* shard ID, retention lease ID, and source.
*/
public class RestAddRetentionLeaseAction extends BaseRestHandler {

private static final int DEFAULT_TIMEOUT_SECONDS = 60;
Expand Down

0 comments on commit b14c9dc

Please sign in to comment.