[Javadocs] add to o.o.rest, snapshots, and tasks packages (#3219)

Adds javadocs to org.opensearch.rest, snapshots, and tasks packages.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
Nick Knize 2022-05-06 13:03:01 -05:00 committed by GitHub
parent a7715ab6ce
commit 15161a8649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
196 changed files with 760 additions and 2 deletions

View File

@ -47,6 +47,11 @@ import java.util.function.Predicate;
import static java.util.stream.Collectors.toSet;
/**
* Base REST channel
*
* @opensearch.api
*/
public abstract class AbstractRestChannel implements RestChannel {
private static final Predicate<String> INCLUDE_FILTER = f -> f.charAt(0) != '-';

View File

@ -67,6 +67,8 @@ import java.util.stream.Collectors;
* the transport requests executed by the associated client. While the context is fully copied over, not all the headers
* are copied, but a selected few. It is possible to control what headers are copied over by returning them in
* {@link ActionPlugin#getRestHeaders()}.
*
* @opensearch.api
*/
public abstract class BaseRestHandler implements RestHandler {

View File

@ -52,6 +52,11 @@ import static org.opensearch.OpenSearchException.REST_EXCEPTION_SKIP_STACK_TRACE
import static org.opensearch.OpenSearchException.REST_EXCEPTION_SKIP_STACK_TRACE_DEFAULT;
import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
/**
* REST response in bytes
*
* @opensearch.api
*/
public class BytesRestResponse extends RestResponse {
public static final String TEXT_CONTENT_TYPE = "text/plain; charset=UTF-8";

View File

@ -40,6 +40,8 @@ import java.util.Objects;
/**
* {@code DeprecationRestHandler} provides a proxy for any existing {@link RestHandler} so that usage of the handler can be
* logged using the {@link DeprecationLogger}.
*
* @opensearch.api
*/
public class DeprecationRestHandler implements RestHandler {

View File

@ -40,6 +40,8 @@ import java.util.Set;
/**
* Encapsulate multiple handlers for the same path, allowing different handlers for different HTTP verbs.
*
* @opensearch.api
*/
final class MethodHandlers {

View File

@ -41,6 +41,8 @@ import java.io.IOException;
/**
* A channel used to construct bytes / builder based outputs, and send responses.
*
* @opensearch.api
*/
public interface RestChannel {

View File

@ -75,6 +75,11 @@ import static org.opensearch.rest.RestStatus.METHOD_NOT_ALLOWED;
import static org.opensearch.rest.RestStatus.NOT_ACCEPTABLE;
import static org.opensearch.rest.RestStatus.OK;
/**
* OpenSearch REST controller
*
* @opensearch.api
*/
public class RestController implements HttpServerTransport.Dispatcher {
private static final Logger logger = LogManager.getLogger(RestController.class);

View File

@ -43,6 +43,8 @@ import java.util.stream.Collectors;
/**
* Handler for REST requests
*
* @opensearch.api
*/
@FunctionalInterface
public interface RestHandler {

View File

@ -35,6 +35,8 @@ package org.opensearch.rest;
/**
* A definition for an http header that should be copied to the {@link org.opensearch.common.util.concurrent.ThreadContext} when
* reading the request on the rest layer.
*
* @opensearch.api
*/
public final class RestHeaderDefinition {
private final String name;

View File

@ -67,6 +67,11 @@ import java.util.stream.Collectors;
import static org.opensearch.common.unit.ByteSizeValue.parseBytesSizeValue;
import static org.opensearch.common.unit.TimeValue.parseTimeValue;
/**
* REST Request
*
* @opensearch.api
*/
public class RestRequest implements ToXContent.Params {
// tchar pattern as defined by RFC7230 section 3.2.6

View File

@ -48,6 +48,8 @@ import java.util.Set;
/**
* Identifies an object that supplies a filter for the content of a {@link RestRequest}. This interface should be implemented by a
* {@link org.opensearch.rest.RestHandler} that expects there will be sensitive content in the body of the request such as a password
*
* @opensearch.api
*/
public interface RestRequestFilter {

View File

@ -42,6 +42,11 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* OpenSearch REST response
*
* @opensearch.api
*/
public abstract class RestResponse {
private Map<String, List<String>> customHeaders;

View File

@ -42,6 +42,11 @@ import java.util.Map;
import static java.util.Collections.unmodifiableMap;
/**
* OpenSearch REST status
*
* @opensearch.api
*/
public enum RestStatus {
/**
* The client SHOULD continue with its request. This interim response is used to inform the client that the

View File

@ -42,6 +42,11 @@ import java.util.Arrays;
import java.util.Map;
import java.util.regex.Pattern;
/**
* REST utility class
*
* @opensearch.api
*/
public class RestUtils {
/**

View File

@ -43,6 +43,8 @@ import java.io.IOException;
/**
* An action listener that requires {@link #processResponse(Object)} to be implemented
* and will automatically handle failures.
*
* @opensearch.api
*/
public abstract class RestActionListener<Response> implements ActionListener<Response> {

View File

@ -61,6 +61,11 @@ import java.util.List;
import static org.opensearch.index.query.AbstractQueryBuilder.parseInnerQueryBuilder;
/**
* REST actions
*
* @opensearch.api
*/
public class RestActions {
public static final ParseField _SHARDS_FIELD = new ParseField("_shards");

View File

@ -38,6 +38,8 @@ import org.opensearch.rest.RestResponse;
/**
* A REST action listener that builds an {@link XContentBuilder} based response.
*
* @opensearch.api
*/
public abstract class RestBuilderListener<Response> extends RestResponseListener<Response> {

View File

@ -58,6 +58,8 @@ import static org.opensearch.action.admin.cluster.node.tasks.get.GetTaskAction.T
/**
* A {@linkplain Client} that cancels tasks executed locally when the provided {@link HttpChannel}
* is closed before completion.
*
* @opensearch.api
*/
public class RestCancellableNodeClient extends FilterClient {
private static final Map<HttpChannel, CloseListener> httpChannels = new ConcurrentHashMap<>();

View File

@ -47,6 +47,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to get field capabilities
*
* @opensearch.api
*/
public class RestFieldCapabilitiesAction extends BaseRestHandler {
@Override

View File

@ -51,6 +51,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.HEAD;
/**
* Main OpenSearch Transport action
*
* @opensearch.api
*/
public class RestMainAction extends BaseRestHandler {
@Override

View File

@ -38,6 +38,8 @@ import org.opensearch.rest.RestResponse;
/**
* A REST enabled action listener that has a basic onFailure implementation, and requires
* sub classes to only implement {@link #buildResponse(Object)}.
*
* @opensearch.api
*/
public abstract class RestResponseListener<Response> extends RestActionListener<Response> {

View File

@ -42,6 +42,8 @@ import java.util.function.Function;
/**
* Content listener that extracts that {@link RestStatus} from the response.
*
* @opensearch.api
*/
public class RestStatusToXContentListener<Response extends StatusToXContentObject> extends RestToXContentListener<Response> {
private final Function<Response, String> extractLocation;

View File

@ -43,6 +43,8 @@ import org.opensearch.rest.RestStatus;
/**
* A REST based action listener that assumes the response is of type {@link ToXContent} and automatically
* builds an XContent based response (wrapping the toXContent in startObject/endObject).
*
* @opensearch.api
*/
public class RestToXContentListener<Response extends ToXContentObject> extends RestResponseListener<Response> {

View File

@ -49,6 +49,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to add voting config exclusions
*
* @opensearch.api
*/
public class RestAddVotingConfigExclusionAction extends BaseRestHandler {
private static final TimeValue DEFAULT_TIMEOUT = TimeValue.timeValueSeconds(30L);
private static final Logger logger = LogManager.getLogger(RestAddVotingConfigExclusionAction.class);

View File

@ -49,6 +49,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.action.admin.cluster.RestListTasksAction.listTasksResponseListener;
/**
* Transport action to cancel tasks
*
* @opensearch.api
*/
public class RestCancelTasksAction extends BaseRestHandler {
private final Supplier<DiscoveryNodes> nodesInCluster;

View File

@ -48,6 +48,8 @@ import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Cleans up a repository
*
* @opensearch.api
*/
public class RestCleanupRepositoryAction extends BaseRestHandler {

View File

@ -45,6 +45,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to clear voting config exclusions
*
* @opensearch.api
*/
public class RestClearVotingConfigExclusionsAction extends BaseRestHandler {
@Override

View File

@ -50,6 +50,8 @@ import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Clones indices from one snapshot into another snapshot in the same repository
*
* @opensearch.api
*/
public class RestCloneSnapshotAction extends BaseRestHandler {

View File

@ -55,6 +55,8 @@ import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Class handling cluster allocation explanation at the REST level
*
* @opensearch.api
*/
public class RestClusterAllocationExplainAction extends BaseRestHandler {

View File

@ -58,6 +58,11 @@ import java.util.Set;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get settings
*
* @opensearch.api
*/
public class RestClusterGetSettingsAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestClusterGetSettingsAction.class);

View File

@ -55,6 +55,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.client.Requests.clusterHealthRequest;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get cluster health
*
* @opensearch.api
*/
public class RestClusterHealthAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestClusterHealthAction.class);

View File

@ -58,6 +58,11 @@ import java.util.Set;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to reroute documents
*
* @opensearch.api
*/
public class RestClusterRerouteAction extends BaseRestHandler {
private static final ObjectParser<ClusterRerouteRequest, Void> PARSER = new ObjectParser<>("cluster_reroute");
static {

View File

@ -49,6 +49,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to search shards
*
* @opensearch.api
*/
public class RestClusterSearchShardsAction extends BaseRestHandler {
@Override

View File

@ -64,6 +64,11 @@ import static java.util.Collections.singletonMap;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get cluster state
*
* @opensearch.api
*/
public class RestClusterStateAction extends BaseRestHandler {
private final SettingsFilter settingsFilter;

View File

@ -45,6 +45,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get cluster stats
*
* @opensearch.api
*/
public class RestClusterStatsAction extends BaseRestHandler {
@Override

View File

@ -50,6 +50,11 @@ import java.util.Set;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to update cluster settings
*
* @opensearch.api
*/
public class RestClusterUpdateSettingsAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestClusterUpdateSettingsAction.class);

View File

@ -50,6 +50,8 @@ import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Creates a new snapshot
*
* @opensearch.api
*/
public class RestCreateSnapshotAction extends BaseRestHandler {

View File

@ -48,6 +48,8 @@ import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Unregisters a repository
*
* @opensearch.api
*/
public class RestDeleteRepositoryAction extends BaseRestHandler {

View File

@ -49,6 +49,8 @@ import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Deletes a snapshot
*
* @opensearch.api
*/
public class RestDeleteSnapshotAction extends BaseRestHandler {

View File

@ -44,6 +44,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete stored script
*
* @opensearch.api
*/
public class RestDeleteStoredScriptAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteStoredScriptAction.class);

View File

@ -53,6 +53,8 @@ import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Returns repository information
*
* @opensearch.api
*/
public class RestGetRepositoriesAction extends BaseRestHandler {

View File

@ -45,6 +45,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get script context
*
* @opensearch.api
*/
public class RestGetScriptContextAction extends BaseRestHandler {
@Override

View File

@ -45,6 +45,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get script language
*
* @opensearch.api
*/
public class RestGetScriptLanguageAction extends BaseRestHandler {
@Override

View File

@ -49,6 +49,8 @@ import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Returns information about snapshot
*
* @opensearch.api
*/
public class RestGetSnapshotsAction extends BaseRestHandler {

View File

@ -44,6 +44,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get stored script
*
* @opensearch.api
*/
public class RestGetStoredScriptAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetStoredScriptAction.class);

View File

@ -46,6 +46,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get task
*
* @opensearch.api
*/
public class RestGetTaskAction extends BaseRestHandler {
@Override

View File

@ -57,6 +57,11 @@ import java.util.function.Supplier;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to list tasks
*
* @opensearch.api
*/
public class RestListTasksAction extends BaseRestHandler {
private final Supplier<DiscoveryNodes> nodesInCluster;

View File

@ -53,6 +53,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get hot threads
*
* @opensearch.api
*/
public class RestNodesHotThreadsAction extends BaseRestHandler {
private static final String formatDeprecatedMessageWithoutNodeID = "[%s] is a deprecated endpoint. "

View File

@ -50,6 +50,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get node info
*
* @opensearch.api
*/
public class RestNodesInfoAction extends BaseRestHandler {
static final Set<String> ALLOWED_METRICS = NodesInfoRequest.Metric.allMetrics();

View File

@ -55,6 +55,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get nodes stats
*
* @opensearch.api
*/
public class RestNodesStatsAction extends BaseRestHandler {
@Override

View File

@ -54,6 +54,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get nodes usage
*
* @opensearch.api
*/
public class RestNodesUsageAction extends BaseRestHandler {
@Override

View File

@ -45,6 +45,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get pending cluster tasks
*
* @opensearch.api
*/
public class RestPendingClusterTasksAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPendingClusterTasksAction.class);

View File

@ -51,6 +51,8 @@ import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Registers repositories
*
* @opensearch.api
*/
public class RestPutRepositoryAction extends BaseRestHandler {

View File

@ -49,6 +49,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put stored script
*
* @opensearch.api
*/
public class RestPutStoredScriptAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutStoredScriptAction.class);

View File

@ -59,6 +59,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to reload secure settings
*
* @opensearch.api
*/
public final class RestReloadSecureSettingsAction extends BaseRestHandler implements RestRequestFilter {
static final ObjectParser<NodesReloadSecureSettingsRequest, String> PARSER = new ObjectParser<>(

View File

@ -44,6 +44,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get remote cluster information
*
* @opensearch.api
*/
public final class RestRemoteClusterInfoAction extends BaseRestHandler {
@Override

View File

@ -48,6 +48,8 @@ import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Restores a snapshot
*
* @opensearch.api
*/
public class RestRestoreSnapshotAction extends BaseRestHandler {

View File

@ -50,6 +50,8 @@ import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Returns status of currently running snapshot
*
* @opensearch.api
*/
public class RestSnapshotsStatusAction extends BaseRestHandler {

View File

@ -46,6 +46,11 @@ import static java.util.Collections.singletonList;
import static org.opensearch.client.Requests.verifyRepositoryRequest;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to verify a repository
*
* @opensearch.api
*/
public class RestVerifyRepositoryAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestVerifyRepositoryAction.class);

View File

@ -48,6 +48,11 @@ import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
import static org.opensearch.rest.RestStatus.ACCEPTED;
/**
* Transport action to delete dangling index
*
* @opensearch.api
*/
public class RestDeleteDanglingIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteDanglingIndexAction.class);

View File

@ -48,6 +48,11 @@ import org.opensearch.rest.RestRequest;
import org.opensearch.rest.RestStatus;
import org.opensearch.rest.action.RestToXContentListener;
/**
* Transport action to import dangling index
*
* @opensearch.api
*/
public class RestImportDanglingIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestImportDanglingIndexAction.class);

View File

@ -44,6 +44,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to list dangling index
*
* @opensearch.api
*/
public class RestListDanglingIndicesAction extends BaseRestHandler {
@Override
public List<Route> routes() {

View File

@ -37,6 +37,11 @@ import org.opensearch.common.io.stream.StreamInput;
import java.io.IOException;
import java.util.Arrays;
/**
* Exception thrown if an alias is not found
*
* @opensearch.api
*/
public class AliasesNotFoundException extends ResourceNotFoundException {
public AliasesNotFoundException(String... names) {

View File

@ -48,6 +48,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to add index block
*
* @opensearch.api
*/
public class RestAddIndexBlockAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestAddIndexBlockAction.class);

View File

@ -47,6 +47,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to analyze an action
*
* @opensearch.api
*/
public class RestAnalyzeAction extends BaseRestHandler {
public static class Fields {

View File

@ -47,6 +47,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to clear indices cache
*
* @opensearch.api
*/
public class RestClearIndicesCacheAction extends BaseRestHandler {
@Override

View File

@ -49,6 +49,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to close index
*
* @opensearch.api
*/
public class RestCloseIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestCloseIndexAction.class);

View File

@ -41,6 +41,11 @@ import java.io.IOException;
import java.util.Collections;
import java.util.List;
/**
* Transport action to create a data stream
*
* @opensearch.api
*/
public class RestCreateDataStreamAction extends BaseRestHandler {
@Override

View File

@ -52,6 +52,11 @@ import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to create an index
*
* @opensearch.api
*/
public class RestCreateIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndexPutAliasAction.class);

View File

@ -44,6 +44,11 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.List;
/**
* Transport action to get data stream stats
*
* @opensearch.api
*/
public class RestDataStreamsStatsAction extends BaseRestHandler {
@Override
public String getName() {

View File

@ -45,6 +45,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete component template
*
* @opensearch.api
*/
public class RestDeleteComponentTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteComponentTemplateAction.class);

View File

@ -45,6 +45,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete composable index template
*
* @opensearch.api
*/
public class RestDeleteComposableIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteComposableIndexTemplateAction.class);

View File

@ -42,6 +42,11 @@ import java.io.IOException;
import java.util.Collections;
import java.util.List;
/**
* Transport action to delete data stream
*
* @opensearch.api
*/
public class RestDeleteDataStreamAction extends BaseRestHandler {
@Override

View File

@ -48,6 +48,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete index
*
* @opensearch.api
*/
public class RestDeleteIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteIndexAction.class);

View File

@ -44,6 +44,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete index template
*
* @opensearch.api
*/
public class RestDeleteIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestDeleteIndexTemplateAction.class);

View File

@ -48,6 +48,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to flush
*
* @opensearch.api
*/
public class RestFlushAction extends BaseRestHandler {
@Override

View File

@ -48,6 +48,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to force merge
*
* @opensearch.api
*/
public class RestForceMergeAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestForceMergeAction.class);

View File

@ -66,6 +66,8 @@ import static org.opensearch.rest.RestRequest.Method.HEAD;
/**
* The REST handler for get alias and head alias APIs.
*
* @opensearch.api
*/
public class RestGetAliasesAction extends BaseRestHandler {

View File

@ -51,6 +51,11 @@ import static org.opensearch.rest.RestRequest.Method.HEAD;
import static org.opensearch.rest.RestStatus.NOT_FOUND;
import static org.opensearch.rest.RestStatus.OK;
/**
* Transport action to get component template
*
* @opensearch.api
*/
public class RestGetComponentTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetComponentTemplateAction.class);

View File

@ -51,6 +51,11 @@ import static org.opensearch.rest.RestRequest.Method.HEAD;
import static org.opensearch.rest.RestStatus.NOT_FOUND;
import static org.opensearch.rest.RestStatus.OK;
/**
* Transport action to get composable index template
*
* @opensearch.api
*/
public class RestGetComposableIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetComposableIndexTemplateAction.class);

View File

@ -41,6 +41,11 @@ import org.opensearch.rest.action.RestToXContentListener;
import java.io.IOException;
import java.util.List;
/**
* Transport action to get data streams
*
* @opensearch.api
*/
public class RestGetDataStreamsAction extends BaseRestHandler {
@Override

View File

@ -59,6 +59,11 @@ import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestStatus.NOT_FOUND;
import static org.opensearch.rest.RestStatus.OK;
/**
* Transport action to get field mapping
*
* @opensearch.api
*/
public class RestGetFieldMappingAction extends BaseRestHandler {
private static final Logger logger = LogManager.getLogger(RestGetFieldMappingAction.class);
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(logger.getName());

View File

@ -56,6 +56,8 @@ import static org.opensearch.rest.RestStatus.OK;
/**
* The REST handler for get template and head template APIs.
*
* @opensearch.api
*/
public class RestGetIndexTemplateAction extends BaseRestHandler {

View File

@ -53,6 +53,8 @@ import static org.opensearch.rest.RestRequest.Method.HEAD;
/**
* The REST handler for get index and head index APIs.
*
* @opensearch.api
*/
public class RestGetIndicesAction extends BaseRestHandler {

View File

@ -59,6 +59,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get mapping
*
* @opensearch.api
*/
public class RestGetMappingAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetMappingAction.class);

View File

@ -48,6 +48,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get settings
*
* @opensearch.api
*/
public class RestGetSettingsAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestGetSettingsAction.class);

View File

@ -47,6 +47,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.DELETE;
/**
* Transport action to delete index aliases
*
* @opensearch.api
*/
public class RestIndexDeleteAliasesAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndexPutAliasAction.class);

View File

@ -50,6 +50,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put alias(es)
*
* @opensearch.api
*/
public class RestIndexPutAliasAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndexPutAliasAction.class);

View File

@ -46,6 +46,11 @@ import java.util.List;
import static java.util.Collections.singletonList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to list alias(es)
*
* @opensearch.api
*/
public class RestIndicesAliasesAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestIndicesAliasesAction.class);

View File

@ -47,6 +47,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get segment information
*
* @opensearch.api
*/
public class RestIndicesSegmentsAction extends BaseRestHandler {
@Override

View File

@ -55,6 +55,8 @@ import static org.opensearch.rest.RestStatus.OK;
/**
* Rest action for {@link IndicesShardStoresAction}
*
* @opensearch.api
*/
public class RestIndicesShardStoresAction extends BaseRestHandler {

View File

@ -56,6 +56,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
/**
* Transport action to get indices stats
*
* @opensearch.api
*/
public class RestIndicesStatsAction extends BaseRestHandler {
@Override

View File

@ -49,6 +49,11 @@ import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to open an index
*
* @opensearch.api
*/
public class RestOpenIndexAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestOpenIndexAction.class);

View File

@ -47,6 +47,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put component template
*
* @opensearch.api
*/
public class RestPutComponentTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutComponentTemplateAction.class);

View File

@ -47,6 +47,11 @@ import java.util.List;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put composable index templates
*
* @opensearch.api
*/
public class RestPutComposableIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutComposableIndexTemplateAction.class);

View File

@ -52,6 +52,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put index template
*
* @opensearch.api
*/
public class RestPutIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutIndexTemplateAction.class);

View File

@ -53,6 +53,11 @@ import static org.opensearch.client.Requests.putMappingRequest;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport action to put mapping
*
* @opensearch.api
*/
public class RestPutMappingAction extends BaseRestHandler {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RestPutMappingAction.class);

View File

@ -49,6 +49,8 @@ import static org.opensearch.rest.RestRequest.Method.GET;
/**
* REST handler to report on index recoveries.
*
* @opensearch.api
*/
public class RestRecoveryAction extends BaseRestHandler {

View File

@ -50,6 +50,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.GET;
import static org.opensearch.rest.RestRequest.Method.POST;
/**
* Transport action to refresh
*
* @opensearch.api
*/
public class RestRefreshAction extends BaseRestHandler {
@Override

View File

@ -53,6 +53,11 @@ import static java.util.Collections.unmodifiableList;
import static org.opensearch.rest.RestRequest.Method.POST;
import static org.opensearch.rest.RestRequest.Method.PUT;
/**
* Transport handler to resize indices
*
* @opensearch.api
*/
public abstract class RestResizeHandler extends BaseRestHandler {
private static final Logger logger = LogManager.getLogger(RestResizeHandler.class);
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(logger.getName());

Some files were not shown because too many files have changed in this diff Show More