From 3aef125d0dbf2f29d9bf00b84cb52892a27a5328 Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Thu, 12 May 2022 14:29:58 -0500 Subject: [PATCH] [Javadocs] add remaining internal classes and reenable missingJavadoc on server (#3296) Adds the remaining javadocs to internal classes and reenables the missingJavadoc gradle task on the server module. From here forward if class level javadocs are missing in the server module, gradle check will fail! Signed-off-by: Nicholas Walter Knize --- gradle/missing-javadoc.gradle | 3 +- .../org/opensearch/action/IndicesRequest.java | 5 ++ .../cluster/health/ClusterHealthRequest.java | 5 ++ .../indices/alias/IndicesAliasesRequest.java | 5 ++ .../admin/indices/get/GetIndexRequest.java | 5 ++ .../admin/indices/stats/CommonStatsFlags.java | 5 ++ .../action/search/TransportSearchAction.java | 5 ++ .../action/support/IndicesOptions.java | 10 ++++ .../action/support/WriteRequest.java | 5 ++ .../replication/ReplicationOperation.java | 5 ++ .../termvectors/TermVectorsRequest.java | 5 ++ .../bootstrap/jvm/DenyJvmVersionsParser.java | 7 +++ .../bootstrap/jvm/package-info.java | 10 ++++ .../opensearch/cluster/AbstractDiffable.java | 5 ++ .../cluster/AbstractNamedDiffable.java | 5 ++ .../org/opensearch/cluster/ClusterInfo.java | 9 +++ .../org/opensearch/cluster/ClusterState.java | 22 +++++++ .../cluster/ClusterStateObserver.java | 22 +++++++ .../cluster/ClusterStateTaskConfig.java | 5 ++ .../cluster/ClusterStateTaskExecutor.java | 12 ++++ .../org/opensearch/cluster/DiffableUtils.java | 26 +++++++++ .../cluster/InternalClusterInfoService.java | 9 +++ .../cluster/NodeConnectionsService.java | 7 +++ .../cluster/RepositoryCleanupInProgress.java | 5 ++ .../opensearch/cluster/RestoreInProgress.java | 11 ++++ .../cluster/SnapshotDeletionsInProgress.java | 7 +++ .../cluster/SnapshotsInProgress.java | 20 +++++++ .../action/index/MappingUpdatedAction.java | 5 ++ .../index/NodeMappingRefreshAction.java | 10 ++++ .../action/shard/ShardStateAction.java | 35 +++++++++++ .../cluster/block/ClusterBlocks.java | 10 ++++ .../ClusterFormationFailureHelper.java | 10 ++++ .../coordination/ClusterStatePublisher.java | 5 ++ .../coordination/CoordinationMetadata.java | 12 ++++ .../coordination/CoordinationState.java | 4 ++ .../cluster/coordination/Coordinator.java | 15 +++++ .../ElectionSchedulerFactory.java | 5 ++ .../coordination/FollowersChecker.java | 12 ++++ .../cluster/coordination/JoinHelper.java | 35 +++++++++++ .../coordination/JoinTaskExecutor.java | 5 ++ .../cluster/coordination/LagDetector.java | 5 ++ .../cluster/coordination/LeaderChecker.java | 10 ++++ .../NodeRemovalClusterStateTaskExecutor.java | 5 ++ .../coordination/OpenSearchNodeCommand.java | 10 ++++ .../PendingClusterStateStats.java | 5 ++ .../coordination/PreVoteCollector.java | 5 ++ .../cluster/coordination/Publication.java | 15 +++++ .../PublicationTransportHandler.java | 2 + .../cluster/coordination/Reconfigurator.java | 5 ++ .../cluster/metadata/AliasAction.java | 8 +++ .../cluster/metadata/AliasMetadata.java | 5 ++ .../ClusterNameExpressionResolver.java | 5 ++ .../metadata/ComponentTemplateMetadata.java | 5 ++ .../metadata/ComposableIndexTemplate.java | 5 ++ .../ComposableIndexTemplateMetadata.java | 5 ++ .../cluster/metadata/DataStream.java | 5 ++ .../cluster/metadata/DataStreamMetadata.java | 10 ++++ .../cluster/metadata/DiffableStringMap.java | 2 + .../cluster/metadata/IndexAbstraction.java | 9 +++ .../cluster/metadata/IndexGraveyard.java | 8 +++ .../cluster/metadata/IndexMetadata.java | 20 +++++++ .../metadata/IndexNameExpressionResolver.java | 12 ++++ .../metadata/IndexTemplateMetadata.java | 5 ++ .../opensearch/cluster/metadata/Manifest.java | 5 ++ .../opensearch/cluster/metadata/Metadata.java | 20 +++++++ .../MetadataCreateDataStreamService.java | 5 ++ .../metadata/MetadataIndexStateService.java | 4 ++ .../MetadataIndexTemplateService.java | 30 ++++++++++ .../SystemIndexMetadataUpgradeService.java | 5 ++ .../cluster/node/DiscoveryNodeFilters.java | 5 ++ .../cluster/node/DiscoveryNodes.java | 10 ++++ .../cluster/routing/IndexRoutingTable.java | 5 ++ .../routing/IndexShardRoutingTable.java | 5 ++ .../cluster/routing/RecoverySource.java | 15 +++++ .../routing/RoutingChangesObserver.java | 5 ++ .../cluster/routing/RoutingNodes.java | 15 +++++ .../cluster/routing/RoutingTable.java | 2 + .../cluster/routing/UnassignedInfo.java | 4 ++ .../routing/allocation/AllocationService.java | 2 + .../allocation/DiskThresholdSettings.java | 15 +++++ .../allocation/NodeAllocationResult.java | 6 +- .../routing/allocation/RoutingAllocation.java | 5 ++ .../allocator/BalancedShardsAllocator.java | 17 ++++++ ...AllocateEmptyPrimaryAllocationCommand.java | 5 ++ .../AllocateReplicaAllocationCommand.java | 5 ++ ...AllocateStalePrimaryAllocationCommand.java | 5 ++ .../command/BasePrimaryAllocationCommand.java | 5 ++ .../ClusterRebalanceAllocationDecider.java | 2 + .../routing/allocation/decider/Decision.java | 6 ++ .../decider/EnableAllocationDecider.java | 4 ++ .../opensearch/common/LocalTimeOffset.java | 5 ++ .../java/org/opensearch/common/Rounding.java | 7 +++ .../common/breaker/CircuitBreaker.java | 10 ++++ .../common/cache/RemovalNotification.java | 5 ++ .../opensearch/common/collect/HppcMaps.java | 10 ++++ .../opensearch/common/collect/Iterators.java | 5 ++ .../common/component/Lifecycle.java | 5 ++ .../org/opensearch/common/geo/GeoUtils.java | 2 + .../common/geo/builders/ShapeBuilder.java | 5 ++ .../common/inject/BindingProcessor.java | 5 ++ .../common/inject/InjectorImpl.java | 2 + .../org/opensearch/common/inject/Key.java | 5 ++ .../opensearch/common/inject/TypeLiteral.java | 2 + .../common/inject/internal/MoreTypes.java | 2 + .../common/inject/spi/InjectionPoint.java | 5 ++ .../common/inject/util/Modules.java | 2 + .../common/logging/DeprecationLogger.java | 5 ++ .../function/FieldValueFactorFunction.java | 2 + .../search/function/FunctionScoreQuery.java | 5 ++ .../common/network/NetworkService.java | 2 + .../org/opensearch/common/path/PathTrie.java | 10 ++++ .../opensearch/common/recycler/Recycler.java | 15 +++++ .../settings/AbstractScopedSettings.java | 2 + .../common/settings/PropertyPlaceholder.java | 2 + .../opensearch/common/settings/Setting.java | 28 +++++++++ .../common/transport/PortsRange.java | 5 ++ .../common/util/CancellableThreads.java | 15 +++++ .../common/util/LongObjectPagedHashMap.java | 5 ++ .../common/util/PageCacheRecycler.java | 5 ++ .../OpenSearchThreadPoolExecutor.java | 5 ++ .../common/util/concurrent/ThreadContext.java | 5 ++ .../org/opensearch/discovery/PeerFinder.java | 10 ++++ .../org/opensearch/env/NodeEnvironment.java | 10 ++++ .../java/org/opensearch/gateway/Gateway.java | 5 ++ .../gateway/LocalAllocateDangledIndices.java | 11 ++++ .../gateway/PersistedClusterStateService.java | 10 ++++ .../TransportNodesListGatewayMetaState.java | 20 +++++++ ...ransportNodesListGatewayStartedShards.java | 20 +++++++ .../org/opensearch/ingest/DropProcessor.java | 5 ++ .../org/opensearch/ingest/IngestDocument.java | 5 ++ .../org/opensearch/ingest/IngestStats.java | 5 ++ .../opensearch/ingest/PipelineProcessor.java | 5 ++ .../org/opensearch/ingest/ValueSource.java | 25 ++++++++ .../org/opensearch/monitor/StatusInfo.java | 5 ++ .../org/opensearch/monitor/fs/FsInfo.java | 15 +++++ .../monitor/jvm/DeadlockAnalyzer.java | 5 ++ .../org/opensearch/monitor/jvm/JvmInfo.java | 5 ++ .../org/opensearch/monitor/jvm/JvmStats.java | 37 ++++++++++++ .../org/opensearch/monitor/os/OsStats.java | 19 ++++++ .../monitor/process/ProcessStats.java | 10 ++++ .../main/java/org/opensearch/node/Node.java | 5 ++ .../org/opensearch/node/ReportingService.java | 5 ++ .../persistent/AllocatedPersistentTask.java | 5 ++ .../CompletionPersistentTaskAction.java | 15 +++++ .../PersistentTasksCustomMetadata.java | 11 ++++ .../PersistentTasksNodeService.java | 5 ++ .../persistent/PersistentTasksService.java | 5 ++ .../RemovePersistentTaskAction.java | 15 +++++ .../persistent/StartPersistentTaskAction.java | 15 +++++ .../UpdatePersistentTaskStatusAction.java | 16 +++++ .../decider/AssignmentDecision.java | 5 ++ .../repositories/ShardGenerations.java | 5 ++ .../VerifyNodeRepositoryAction.java | 5 ++ .../org/opensearch/rest/BaseRestHandler.java | 5 ++ .../java/org/opensearch/rest/RestHandler.java | 10 ++++ .../java/org/opensearch/rest/RestRequest.java | 15 +++++ .../admin/indices/RestAnalyzeAction.java | 5 ++ .../admin/indices/RestResizeHandler.java | 15 +++++ .../rest/action/document/RestIndexAction.java | 10 ++++ .../opensearch/script/AggregationScript.java | 4 ++ .../script/BucketAggregationScript.java | 5 ++ .../BucketAggregationSelectorScript.java | 5 ++ .../org/opensearch/script/FieldScript.java | 11 +++- .../org/opensearch/script/FilterScript.java | 12 +++- .../script/IngestConditionalScript.java | 5 ++ .../org/opensearch/script/IngestScript.java | 5 ++ .../opensearch/script/NumberSortScript.java | 4 ++ .../org/opensearch/script/ScoreScript.java | 18 +++++- .../opensearch/script/ScoreScriptUtils.java | 58 ++++++++++++++++++- .../org/opensearch/script/ScriptCache.java | 5 ++ .../opensearch/script/ScriptContextInfo.java | 10 ++++ .../opensearch/script/ScriptException.java | 5 ++ .../org/opensearch/script/ScriptMetadata.java | 2 + .../script/ScriptedMetricAggContexts.java | 45 ++++++++++++++ .../SignificantTermsHeuristicScoreScript.java | 5 ++ .../opensearch/script/SimilarityScript.java | 5 ++ .../script/SimilarityWeightScript.java | 5 ++ .../opensearch/script/StringSortScript.java | 4 ++ .../org/opensearch/script/TemplateScript.java | 5 ++ .../script/TermsSetQueryScript.java | 4 ++ .../org/opensearch/script/UpdateScript.java | 5 ++ .../opensearch/snapshots/RestoreService.java | 5 ++ .../org/opensearch/threadpool/ThreadPool.java | 15 +++++ .../threadpool/ThreadPoolStats.java | 5 ++ .../watcher/ResourceWatcherService.java | 5 ++ 185 files changed, 1613 insertions(+), 12 deletions(-) create mode 100644 server/src/main/java/org/opensearch/bootstrap/jvm/package-info.java diff --git a/gradle/missing-javadoc.gradle b/gradle/missing-javadoc.gradle index 29fede8967a59..2313807e0bd02 100644 --- a/gradle/missing-javadoc.gradle +++ b/gradle/missing-javadoc.gradle @@ -178,8 +178,7 @@ configure([ configure(project(":server")) { project.tasks.withType(MissingJavadocTask) { - isExcluded = true - // TODO: reenable after fixing missing javadocs + // TODO: bump to variable missing level after increasing javadoc coverage javadocMissingLevel = "class" } } diff --git a/server/src/main/java/org/opensearch/action/IndicesRequest.java b/server/src/main/java/org/opensearch/action/IndicesRequest.java index d2e4504dd7db1..7e4c2f5076cda 100644 --- a/server/src/main/java/org/opensearch/action/IndicesRequest.java +++ b/server/src/main/java/org/opensearch/action/IndicesRequest.java @@ -64,6 +64,11 @@ default boolean includeDataStreams() { return false; } + /** + * Replaceable interface. + * + * @opensearch.internal + */ interface Replaceable extends IndicesRequest { /** * Sets the indices that the action relates to. diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java index d6d494c4261bd..026cf2274452e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -289,6 +289,11 @@ public ActionRequestValidationException validate() { return null; } + /** + * The level of the health request. + * + * @opensearch.internal + */ public enum Level { CLUSTER, INDICES, diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java index d6a1488f3f226..62f51aa3f3bff 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java @@ -120,6 +120,11 @@ public static class AliasActions implements AliasesRequest, Writeable, ToXConten private static final ParseField REMOVE = new ParseField("remove"); private static final ParseField REMOVE_INDEX = new ParseField("remove_index"); + /** + * The type of request. + * + * @opensearch.internal + */ public enum Type { ADD((byte) 0, AliasActions.ADD), REMOVE((byte) 1, AliasActions.REMOVE), diff --git a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java index 909092078b6ae..9a7fae9f84a98 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/get/GetIndexRequest.java @@ -46,6 +46,11 @@ * @opensearch.internal */ public class GetIndexRequest extends ClusterInfoRequest { + /** + * The features to get. + * + * @opensearch.internal + */ public enum Feature { ALIASES((byte) 0), MAPPINGS((byte) 1), diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java index 9eec34d87c384..9a24d8a42dc9d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/CommonStatsFlags.java @@ -261,6 +261,11 @@ public CommonStatsFlags clone() { } } + /** + * The flags. + * + * @opensearch.internal + */ public enum Flag { Store("store", 0), Indexing("indexing", 1), diff --git a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java index 6ab49d975cddd..5dd576fa6ce53 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java @@ -284,6 +284,11 @@ protected void doExecute(Task task, SearchRequest searchRequest, ActionListener< executeRequest(task, searchRequest, this::searchAsyncAction, listener); } + /** + * The single phase search action. + * + * @opensearch.internal + */ public interface SinglePhaseSearchAction { void executeOnShardTarget( SearchTask searchTask, diff --git a/server/src/main/java/org/opensearch/action/support/IndicesOptions.java b/server/src/main/java/org/opensearch/action/support/IndicesOptions.java index 292a2c4b7d3da..3fb572d0ecbbf 100644 --- a/server/src/main/java/org/opensearch/action/support/IndicesOptions.java +++ b/server/src/main/java/org/opensearch/action/support/IndicesOptions.java @@ -60,6 +60,11 @@ */ public class IndicesOptions implements ToXContentFragment { + /** + * The wildcard states. + * + * @opensearch.internal + */ public enum WildcardStates { OPEN, CLOSED, @@ -120,6 +125,11 @@ private static void updateSetForValue(EnumSet states, String wil } } + /** + * The options. + * + * @opensearch.internal + */ public enum Option { IGNORE_UNAVAILABLE, IGNORE_ALIASES, diff --git a/server/src/main/java/org/opensearch/action/support/WriteRequest.java b/server/src/main/java/org/opensearch/action/support/WriteRequest.java index 81faf9a8f88ca..16573ab619f2f 100644 --- a/server/src/main/java/org/opensearch/action/support/WriteRequest.java +++ b/server/src/main/java/org/opensearch/action/support/WriteRequest.java @@ -75,6 +75,11 @@ default R setRefreshPolicy(String refreshPolicy) { ActionRequestValidationException validate(); + /** + * The refresh policy of the request. + * + * @opensearch.internal + */ enum RefreshPolicy implements Writeable { /** * Don't refresh after this request. The default. diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java index cf40e872fe9b8..da37eee88a4e0 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java @@ -616,6 +616,11 @@ public RetryOnPrimaryException(StreamInput in) throws IOException { } } + /** + * The result of the primary. + * + * @opensearch.internal + */ public interface PrimaryResult> { /** diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java index 25f33934dbb80..cf2d10d2f1db3 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java @@ -568,6 +568,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeLong(version); } + /** + * The flags. + * + * @opensearch.internal + */ public enum Flag { // Do not change the order of these flags we use // the ordinal for encoding! Only append to the end! diff --git a/server/src/main/java/org/opensearch/bootstrap/jvm/DenyJvmVersionsParser.java b/server/src/main/java/org/opensearch/bootstrap/jvm/DenyJvmVersionsParser.java index a9c908c058508..65b50344b8e3a 100644 --- a/server/src/main/java/org/opensearch/bootstrap/jvm/DenyJvmVersionsParser.java +++ b/server/src/main/java/org/opensearch/bootstrap/jvm/DenyJvmVersionsParser.java @@ -24,8 +24,15 @@ /** * Parses the list of JVM versions which should be denied to run Opensearch engine with due to discovered * issues or flaws. + * + * @opensearch.internal */ public class DenyJvmVersionsParser { + /** + * Provides the reason for the denial + * + * @opensearch.internal + */ public interface VersionPredicate extends Predicate { String getReason(); } diff --git a/server/src/main/java/org/opensearch/bootstrap/jvm/package-info.java b/server/src/main/java/org/opensearch/bootstrap/jvm/package-info.java new file mode 100644 index 0000000000000..e171e705a29f7 --- /dev/null +++ b/server/src/main/java/org/opensearch/bootstrap/jvm/package-info.java @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** jvm specific bootstrapping */ +package org.opensearch.bootstrap.jvm; diff --git a/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java b/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java index 600f972fd9d63..834d78a384423 100644 --- a/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java +++ b/server/src/main/java/org/opensearch/cluster/AbstractDiffable.java @@ -66,6 +66,11 @@ public static > Diff readDiffFrom(Reader reader, Str return (Diff) EMPTY; } + /** + * A complete diff. + * + * @opensearch.internal + */ private static class CompleteDiff> implements Diff { @Nullable diff --git a/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java b/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java index 8af061a0874c9..f4780eb71edda 100644 --- a/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java +++ b/server/src/main/java/org/opensearch/cluster/AbstractNamedDiffable.java @@ -62,6 +62,11 @@ public static > NamedDiff readDiffFrom(Class(tClass, name, in); } + /** + * A complete named diff. + * + * @opensearch.internal + */ private static class CompleteNamedDiff> implements NamedDiff { @Nullable diff --git a/server/src/main/java/org/opensearch/cluster/ClusterInfo.java b/server/src/main/java/org/opensearch/cluster/ClusterInfo.java index 8803af9a5419a..6c7f4ba487568 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterInfo.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterInfo.java @@ -244,6 +244,8 @@ static String shardIdentifierFromRouting(ShardRouting shardRouting) { /** * Represents a data path on a node + * + * @opensearch.internal */ public static class NodeAndPath implements Writeable { public final String nodeId; @@ -281,6 +283,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * Represents the total amount of "reserved" space on a particular data path, together with the set of shards considered. + * + * @opensearch.internal */ public static class ReservedSpace implements Writeable { @@ -344,6 +348,11 @@ void toXContent(XContentBuilder builder, Params params) throws IOException { builder.endArray(); // end "shards" } + /** + * Builder for Reserved Space. + * + * @opensearch.internal + */ public static class Builder { private long total; private ObjectHashSet shardIds = new ObjectHashSet<>(); diff --git a/server/src/main/java/org/opensearch/cluster/ClusterState.java b/server/src/main/java/org/opensearch/cluster/ClusterState.java index 4010002561930..5431bbdbeaf38 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterState.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterState.java @@ -106,6 +106,8 @@ public class ClusterState implements ToXContentFragment, Diffable /** * An interface that implementors use when a class requires a client to maybe have a feature. + * + * @opensearch.internal */ public interface FeatureAware { @@ -135,6 +137,11 @@ static boolean shouldSerializ } + /** + * Custom cluster state. + * + * @opensearch.internal + */ public interface Custom extends NamedDiffable, ToXContentFragment, FeatureAware { /** @@ -403,6 +410,11 @@ public boolean supersedes(ClusterState other) { } + /** + * Metrics for cluster state. + * + * @opensearch.internal + */ public enum Metric { VERSION("version"), @@ -582,6 +594,11 @@ public static Builder builder(ClusterState state) { return new Builder(state); } + /** + * Builder for cluster state. + * + * @opensearch.internal + */ public static class Builder { private final ClusterName clusterName; @@ -778,6 +795,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeVInt(minimumClusterManagerNodesOnPublishingClusterManager); } + /** + * The cluster state diff. + * + * @opensearch.internal + */ private static class ClusterStateDiff implements Diff { private final long toVersion; diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java b/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java index 5e99ebe229c6a..7ab5785bac350 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateObserver.java @@ -207,6 +207,11 @@ public void waitForNextChange(Listener listener, Predicate statePr } } + /** + * An observer of the cluster state for changes. + * + * @opensearch.internal + */ class ObserverClusterStateListener implements TimeoutClusterStateListener { @Override @@ -298,6 +303,8 @@ public String toString() { /** * The observer considers two cluster states to be the same if they have the same version and cluster-manager node id (i.e. null or set) + * + * @opensearch.internal */ private static class StoredState { private final String clusterManagerNodeId; @@ -317,6 +324,11 @@ public boolean isOlderOrDifferentClusterManager(ClusterState clusterState) { } } + /** + * Listener for the observer. + * + * @opensearch.internal + */ public interface Listener { /** called when a new state is observed */ @@ -328,6 +340,11 @@ public interface Listener { void onTimeout(TimeValue timeout); } + /** + * Context for the observer. + * + * @opensearch.internal + */ static class ObservingContext { public final Listener listener; public final Predicate statePredicate; @@ -343,6 +360,11 @@ public String toString() { } } + /** + * A context preserving listener. + * + * @opensearch.internal + */ private static final class ContextPreservingListener implements Listener { private final Listener delegate; private final Supplier contextSupplier; diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java index 8d775b92a0431..9a4b708548a7d 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskConfig.java @@ -85,6 +85,11 @@ static ClusterStateTaskConfig build(Priority priority, TimeValue timeout) { return new Basic(priority, timeout); } + /** + * Basic task config. + * + * @opensearch.internal + */ class Basic implements ClusterStateTaskConfig { final TimeValue timeout; final Priority priority; diff --git a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java index 8d40f447abe98..00e58d88d8798 100644 --- a/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/ClusterStateTaskExecutor.java @@ -81,6 +81,8 @@ default String describeTasks(List tasks) { /** * Represents the result of a batched execution of cluster state update tasks * @param the type of the cluster state update task + * + * @opensearch.internal */ class ClusterTasksResult { @Nullable @@ -101,6 +103,11 @@ public static Builder builder() { return new Builder<>(); } + /** + * Builder for cluster state task. + * + * @opensearch.internal + */ public static class Builder { private final Map executionResults = new IdentityHashMap<>(); @@ -142,6 +149,11 @@ ClusterTasksResult build(ClusterTasksResult result, ClusterState previousS } } + /** + * The task result. + * + * @opensearch.internal + */ final class TaskResult { private final Exception failure; diff --git a/server/src/main/java/org/opensearch/cluster/DiffableUtils.java b/server/src/main/java/org/opensearch/cluster/DiffableUtils.java index 88a240938c468..f2a20b356d25d 100644 --- a/server/src/main/java/org/opensearch/cluster/DiffableUtils.java +++ b/server/src/main/java/org/opensearch/cluster/DiffableUtils.java @@ -229,6 +229,8 @@ public static > MapDiff> readJdkMapDiff * Represents differences between two Maps of (possibly diffable) objects. * * @param the diffable object + * + * @opensearch.internal */ private static class JdkMapDiff extends MapDiff> { @@ -283,6 +285,8 @@ public Map apply(Map map) { * Represents differences between two ImmutableOpenMap of (possibly diffable) objects * * @param the object type + * + * @opensearch.internal */ public static class ImmutableOpenMapDiff extends MapDiff> { @@ -369,6 +373,8 @@ public ImmutableOpenMap apply(ImmutableOpenMap map) { * Represents differences between two ImmutableOpenIntMap of (possibly diffable) objects * * @param the object type + * + * @opensearch.internal */ private static class ImmutableOpenIntMapDiff extends MapDiff> { @@ -434,6 +440,8 @@ public ImmutableOpenIntMap apply(ImmutableOpenIntMap map) { * @param the type of map keys * @param the type of map values * @param the map implementation type + * + * @opensearch.internal */ public abstract static class MapDiff implements Diff { @@ -553,6 +561,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * Provides read and write operations to serialize keys of map * @param type of key + * + * @opensearch.internal */ public interface KeySerializer { void writeKey(K key, StreamOutput out) throws IOException; @@ -562,6 +572,8 @@ public interface KeySerializer { /** * Serializes String keys of a map + * + * @opensearch.internal */ private static final class StringKeySerializer implements KeySerializer { private static final StringKeySerializer INSTANCE = new StringKeySerializer(); @@ -579,6 +591,8 @@ public String readKey(StreamInput in) throws IOException { /** * Serializes Integer keys of a map as an Int + * + * @opensearch.internal */ private static final class IntKeySerializer implements KeySerializer { public static final IntKeySerializer INSTANCE = new IntKeySerializer(); @@ -596,6 +610,8 @@ public Integer readKey(StreamInput in) throws IOException { /** * Serializes Integer keys of a map as a VInt. Requires keys to be positive. + * + * @opensearch.internal */ private static final class VIntKeySerializer implements KeySerializer { public static final IntKeySerializer INSTANCE = new IntKeySerializer(); @@ -625,6 +641,8 @@ public Integer readKey(StreamInput in) throws IOException { * * @param key type of map * @param value type of map + * + * @opensearch.internal */ public interface ValueSerializer { @@ -679,6 +697,8 @@ default boolean supportsVersion(V value, Version version) { * * @param type of map keys * @param type of map values + * + * @opensearch.internal */ public abstract static class DiffableValueSerializer> implements ValueSerializer { private static final DiffableValueSerializer WRITE_ONLY_INSTANCE = new DiffableValueSerializer() { @@ -722,6 +742,8 @@ public void writeDiff(Diff value, StreamOutput out) throws IOException { * * @param type of map keys * @param type of map values + * + * @opensearch.internal */ public abstract static class NonDiffableValueSerializer implements ValueSerializer { @Override @@ -749,6 +771,8 @@ public Diff readDiff(StreamInput in, K key) throws IOException { * Implementation of the ValueSerializer that wraps value and diff readers. * * Note: this implementation is ignoring the key. + * + * @opensearch.internal */ public static class DiffableValueReader> extends DiffableValueSerializer { private final Reader reader; @@ -774,6 +798,8 @@ public Diff readDiff(StreamInput in, K key) throws IOException { * Implementation of ValueSerializer that serializes immutable sets * * @param type of map key + * + * @opensearch.internal */ public static class StringSetValueSerializer extends NonDiffableValueSerializer> { private static final StringSetValueSerializer INSTANCE = new StringSetValueSerializer(); diff --git a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java index ac70e42149086..97b6f81f35449 100644 --- a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java +++ b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java @@ -469,6 +469,11 @@ static void fillDiskUsagePerNode( } } + /** + * Indices statistics summary. + * + * @opensearch.internal + */ private static class IndicesStatsSummary { static final IndicesStatsSummary EMPTY = new IndicesStatsSummary( ImmutableOpenMap.of(), @@ -493,6 +498,8 @@ private static class IndicesStatsSummary { /** * Runs {@link InternalClusterInfoService#refresh()}, logging failures/rejections appropriately. + * + * @opensearch.internal */ private class RefreshRunnable extends AbstractRunnable { private final String reason; @@ -526,6 +533,8 @@ public void onRejection(Exception e) { /** * Runs {@link InternalClusterInfoService#refresh()}, logging failures/rejections appropriately, and reschedules itself on completion. + * + * @opensearch.internal */ private class RefreshAndRescheduleRunnable extends RefreshRunnable { RefreshAndRescheduleRunnable() { diff --git a/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java b/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java index c642d3652c47a..0014d5c61fb2d 100644 --- a/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java +++ b/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java @@ -229,6 +229,11 @@ private void connectDisconnectedTargets(Runnable onCompletion) { runnables.forEach(Runnable::run); } + /** + * A connection checker. + * + * @opensearch.internal + */ class ConnectionChecker extends AbstractRunnable { protected void doRun() { if (connectionChecker == this) { @@ -311,6 +316,8 @@ private enum ActivityType { * Similarly if we are currently disconnecting and then {@link ConnectionTarget#connect(ActionListener)} is called then all * disconnection listeners are immediately removed for failure notification and a connection is started once the disconnection is * complete. + * + * @opensearch.internal */ private class ConnectionTarget { private final DiscoveryNode discoveryNode; diff --git a/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java b/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java index 0f69acf12272a..2cf9d66fee2bd 100644 --- a/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/RepositoryCleanupInProgress.java @@ -117,6 +117,11 @@ public Version getMinimalSupportedVersion() { return LegacyESVersion.V_7_4_0; } + /** + * Entry in the collection. + * + * @opensearch.internal + */ public static final class Entry implements Writeable, RepositoryOperation { private final String repository; diff --git a/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java b/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java index 45d9c8b373298..c68c8c54461a3 100644 --- a/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/RestoreInProgress.java @@ -112,6 +112,11 @@ public Iterator iterator() { return entries.valuesIt(); } + /** + * Builder of the restore. + * + * @opensearch.internal + */ public static final class Builder { private final ImmutableOpenMap.Builder entries = ImmutableOpenMap.builder(); @@ -134,6 +139,8 @@ public RestoreInProgress build() { /** * Restore metadata + * + * @opensearch.internal */ public static class Entry { private final String uuid; @@ -237,6 +244,8 @@ public int hashCode() { /** * Represents status of a restored shard + * + * @opensearch.internal */ public static class ShardRestoreStatus implements Writeable { private State state; @@ -360,6 +369,8 @@ public int hashCode() { /** * Shard restore process state + * + * @opensearch.internal */ public enum State { /** diff --git a/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java b/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java index bf2ab3f269357..0f95890e56ec2 100644 --- a/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/SnapshotDeletionsInProgress.java @@ -219,6 +219,8 @@ public String toString() { /** * A class representing a snapshot deletion request entry in the cluster state. + * + * @opensearch.internal */ public static final class Entry implements Writeable, RepositoryOperation { private final List snapshots; @@ -375,6 +377,11 @@ public String toString() { } } + /** + * State of the deletions. + * + * @opensearch.internal + */ public enum State implements Writeable { /** diff --git a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java index 033c0bafc971d..0ff373b6116de 100644 --- a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java @@ -177,6 +177,11 @@ public static Entry startClone( ); } + /** + * Entry in the collection. + * + * @opensearch.internal + */ public static class Entry implements Writeable, ToXContent, RepositoryOperation { private final State state; private final Snapshot snapshot; @@ -778,6 +783,11 @@ private static boolean hasFailures(ImmutableOpenMap { @Override @@ -96,6 +101,11 @@ public void messageReceived(NodeMappingRefreshRequest request, TransportChannel } } + /** + * Request to refresh node mapping. + * + * @opensearch.internal + */ public static class NodeMappingRefreshRequest extends TransportRequest implements IndicesRequest { private String index; diff --git a/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java b/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java index 47ad61913a947..93ddd74322ce9 100644 --- a/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java +++ b/server/src/main/java/org/opensearch/cluster/action/shard/ShardStateAction.java @@ -333,6 +333,11 @@ private void setFollowUpRerouteTaskPriority(Priority followUpRerouteTaskPriority this.followUpRerouteTaskPriority = followUpRerouteTaskPriority; } + /** + * A transport handler for a shard failed action. + * + * @opensearch.internal + */ private static class ShardFailedTransportHandler implements TransportRequestHandler { private final ClusterService clusterService; private final ShardFailedClusterStateTaskExecutor shardFailedClusterStateTaskExecutor; @@ -416,6 +421,11 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS } } + /** + * Executor if shard fails cluster state task. + * + * @opensearch.internal + */ public static class ShardFailedClusterStateTaskExecutor implements ClusterStateTaskExecutor { private final AllocationService allocationService; private final RerouteService rerouteService; @@ -552,6 +562,11 @@ public void clusterStatePublished(ClusterChangedEvent clusterChangedEvent) { } } + /** + * Entry for a failed shard. + * + * @opensearch.internal + */ public static class FailedShardEntry extends TransportRequest { final ShardId shardId; final String allocationId; @@ -658,6 +673,11 @@ public void shardStarted( sendShardAction(SHARD_STARTED_ACTION_NAME, currentState, entry, listener); } + /** + * Handler for a shard started action. + * + * @opensearch.internal + */ private static class ShardStartedTransportHandler implements TransportRequestHandler { private final ClusterService clusterService; private final ShardStartedClusterStateTaskExecutor shardStartedClusterStateTaskExecutor; @@ -687,6 +707,11 @@ public void messageReceived(StartedShardEntry request, TransportChannel channel, } } + /** + * Executor for when shard starts cluster state. + * + * @opensearch.internal + */ public static class ShardStartedClusterStateTaskExecutor implements ClusterStateTaskExecutor, @@ -812,6 +837,11 @@ public void clusterStatePublished(ClusterChangedEvent clusterChangedEvent) { } } + /** + * try for started shard. + * + * @opensearch.internal + */ public static class StartedShardEntry extends TransportRequest { final ShardId shardId; final String allocationId; @@ -855,6 +885,11 @@ public String toString() { } } + /** + * Error thrown when a shard is no longer primary. + * + * @opensearch.internal + */ public static class NoLongerPrimaryShardException extends OpenSearchException { public NoLongerPrimaryShardException(ShardId shardId, String msg) { diff --git a/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java b/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java index b889688bdd390..f5dc0eb8fdb5e 100644 --- a/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java +++ b/server/src/main/java/org/opensearch/cluster/block/ClusterBlocks.java @@ -321,6 +321,11 @@ public static Diff readDiffFrom(StreamInput in) throws IOExceptio return AbstractDiffable.readDiffFrom(ClusterBlocks::readFrom, in); } + /** + * An immutable level holder. + * + * @opensearch.internal + */ static class ImmutableLevelHolder { private final Set global; @@ -344,6 +349,11 @@ public static Builder builder() { return new Builder(); } + /** + * Builder for cluster blocks. + * + * @opensearch.internal + */ public static class Builder { private final Set global = new HashSet<>(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java index ee175b5f6fd24..e93eddc02337e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java @@ -107,6 +107,11 @@ public void stop() { warningScheduler = null; } + /** + * A warning scheduler. + * + * @opensearch.internal + */ private class WarningScheduler { private boolean isActive() { @@ -143,6 +148,11 @@ public String toString() { } } + /** + * State of the cluster formation. + * + * @opensearch.internal + */ static class ClusterFormationState { private final Settings settings; private final ClusterState clusterState; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java index 6e932afb34ab1..3900155ffc12e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterStatePublisher.java @@ -56,6 +56,11 @@ public interface ClusterStatePublisher { */ void publish(ClusterChangedEvent clusterChangedEvent, ActionListener publishListener, AckListener ackListener); + /** + * An acknowledgement listener. + * + * @opensearch.internal + */ interface AckListener { /** * Should be called when the cluster coordination layer has committed the cluster state (i.e. even if this publication fails, diff --git a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java index 3f24f59179641..9a3d7817e6e00 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationMetadata.java @@ -211,6 +211,11 @@ public String toString() { + '}'; } + /** + * Builder for coordination metadata. + * + * @opensearch.internal + */ public static class Builder { private long term = 0; private VotingConfiguration lastCommittedConfiguration = VotingConfiguration.EMPTY_CONFIG; @@ -258,6 +263,11 @@ public CoordinationMetadata build() { } } + /** + * Excluded nodes from voting config. + * + * @opensearch.internal + */ public static class VotingConfigExclusion implements Writeable, ToXContentFragment { public static final String MISSING_VALUE_MARKER = "_absent_"; private final String nodeId; @@ -351,6 +361,8 @@ public String toString() { /** * A collection of persistent node ids, denoting the voting configuration for cluster state changes. + * + * @opensearch.internal */ public static class VotingConfiguration implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java index eff55e6d88193..fcae32af9cad5 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java @@ -569,6 +569,8 @@ public void close() throws IOException { /** * Pluggable persistence layer for {@link CoordinationState}. + * + * @opensearch.internal */ public interface PersistedState extends Closeable { @@ -641,6 +643,8 @@ default void close() throws IOException {} /** * A collection of votes, used to calculate quorums. Optionally records the Joins as well. + * + * @opensearch.internal */ public static class VoteCollection { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java index 52052b3c1adde..5a4f9be40600d 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java @@ -1351,12 +1351,22 @@ public Collection> getOnJoinValidators() return onJoinValidators; } + /** + * The mode of the coordinator. + * + * @opensearch.internal + */ public enum Mode { CANDIDATE, LEADER, FOLLOWER } + /** + * The coordinator peer finder. + * + * @opensearch.internal + */ private class CoordinatorPeerFinder extends PeerFinder { CoordinatorPeerFinder( @@ -1480,6 +1490,11 @@ boolean cancelCommittedPublication() { } } + /** + * The coordinator publication. + * + * @opensearch.internal + */ class CoordinatorPublication extends Publication { private final PublishRequest publishRequest; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java b/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java index dfaed3a598acc..828db5864d28b 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/ElectionSchedulerFactory.java @@ -183,6 +183,11 @@ public String toString() { + '}'; } + /** + * The Election scheduler. + * + * @opensearch.internal + */ private class ElectionScheduler implements Releasable { private final AtomicBoolean isClosed = new AtomicBoolean(); private final AtomicLong attempt = new AtomicLong(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java b/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java index 24eac6ac06a8c..c9a9ba9af09cd 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/FollowersChecker.java @@ -294,6 +294,11 @@ private void handleDisconnectedNode(DiscoveryNode discoveryNode) { } } + /** + * A fast response state. + * + * @opensearch.internal + */ static class FastResponseState { final long term; final Mode mode; @@ -311,6 +316,8 @@ public String toString() { /** * A checker for an individual follower. + * + * @opensearch.internal */ private class FollowerChecker { private final DiscoveryNode discoveryNode; @@ -449,6 +456,11 @@ public String toString() { } } + /** + * Request to check follower. + * + * @opensearch.internal + */ public static class FollowerCheckRequest extends TransportRequest { private final long term; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java index 54894c4e28196..8ec215719b642 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java @@ -253,6 +253,11 @@ public void sendJoinRequest(DiscoveryNode destination, long term, Optional sendJoinRequest(destination, term, optionalJoin, () -> {}); } + /** + * A failed join attempt. + * + * @opensearch.internal + */ // package-private for testing static class FailedJoinAttempt { private final DiscoveryNode destination; @@ -392,12 +397,22 @@ public void sendValidateJoinRequest(DiscoveryNode node, ClusterState state, Acti ); } + /** + * The callback interface. + * + * @opensearch.internal + */ public interface JoinCallback { void onSuccess(); void onFailure(Exception e); } + /** + * Listener for the join task + * + * @opensearch.internal + */ static class JoinTaskListener implements ClusterStateTaskListener { private final JoinTaskExecutor.Task task; private final JoinCallback joinCallback; @@ -429,6 +444,11 @@ interface JoinAccumulator { default void close(Mode newMode) {} } + /** + * A leader join accumulator. + * + * @opensearch.internal + */ class LeaderJoinAccumulator implements JoinAccumulator { @Override public void handleJoinRequest(DiscoveryNode sender, JoinCallback joinCallback) { @@ -449,6 +469,11 @@ public String toString() { } } + /** + * An initial join accumulator. + * + * @opensearch.internal + */ static class InitialJoinAccumulator implements JoinAccumulator { @Override public void handleJoinRequest(DiscoveryNode sender, JoinCallback joinCallback) { @@ -462,6 +487,11 @@ public String toString() { } } + /** + * A follower join accumulator. + * + * @opensearch.internal + */ static class FollowerJoinAccumulator implements JoinAccumulator { @Override public void handleJoinRequest(DiscoveryNode sender, JoinCallback joinCallback) { @@ -474,6 +504,11 @@ public String toString() { } } + /** + * A candidate join accumulator. + * + * @opensearch.internal + */ class CandidateJoinAccumulator implements JoinAccumulator { private final Map joinRequestAccumulator = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java index aaaa73e891073..766dd2d11b03e 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java @@ -75,6 +75,11 @@ public class JoinTaskExecutor implements ClusterStateTaskExecutor getTrackedNodes() { return Collections.unmodifiableSet(appliedStateTrackersByNode.keySet()); } + /** + * A tracker that the node applied state. + * + * @opensearch.internal + */ private class NodeAppliedStateTracker { private final DiscoveryNode discoveryNode; private final AtomicLong appliedVersion = new AtomicLong(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java b/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java index 7cb306bfd89f6..f1d2754fbbfa7 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/LeaderChecker.java @@ -233,6 +233,11 @@ private void handleDisconnectedNode(DiscoveryNode discoveryNode) { } } + /** + * A check scheduler. + * + * @opensearch.internal + */ private class CheckScheduler implements Releasable { private final AtomicBoolean isClosed = new AtomicBoolean(); @@ -380,6 +385,11 @@ public String toString() { } } + /** + * A leader check request. + * + * @opensearch.internal + */ static class LeaderCheckRequest extends TransportRequest { private final DiscoveryNode sender; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java b/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java index 3625366fa4de1..3a466d0bfe6dd 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/NodeRemovalClusterStateTaskExecutor.java @@ -56,6 +56,11 @@ public class NodeRemovalClusterStateTaskExecutor private final AllocationService allocationService; private final Logger logger; + /** + * Task for the executor. + * + * @opensearch.internal + */ public static class Task { private final DiscoveryNode node; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java index 9110f1789521e..9f8e1c6c1e848 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java @@ -230,6 +230,11 @@ OptionParser getParser() { return parser; } + /** + * Custom unknown metadata. + * + * @opensearch.internal + */ public static class UnknownMetadataCustom implements Metadata.Custom { private final String name; @@ -274,6 +279,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * An unknown condition. + * + * @opensearch.internal + */ public static class UnknownCondition extends Condition { public UnknownCondition(String name, Object value) { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java b/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java index d6f767d3e6235..a4e09d00a874f 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PendingClusterStateStats.java @@ -92,6 +92,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String QUEUE = "cluster_state_queue"; static final String TOTAL = "total"; diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java index c635dee173792..2cf7ebcc850a5 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PreVoteCollector.java @@ -167,6 +167,11 @@ public String toString() { return "PreVoteCollector{" + "state=" + state + '}'; } + /** + * The pre vote round. + * + * @opensearch.internal + */ private class PreVotingRound implements Releasable { private final Map preVotesReceived = newConcurrentMap(); private final AtomicBoolean electionStarted = new AtomicBoolean(); diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Publication.java b/server/src/main/java/org/opensearch/cluster/coordination/Publication.java index 3580de423ac95..c85ea07591edc 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Publication.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Publication.java @@ -252,6 +252,11 @@ enum PublicationTargetState { APPLIED_COMMIT, } + /** + * A publication target. + * + * @opensearch.internal + */ class PublicationTarget { private final DiscoveryNode discoveryNode; private boolean ackIsPending = true; @@ -363,6 +368,11 @@ boolean isFailed() { return state == PublicationTargetState.FAILED; } + /** + * A handler for a publish response. + * + * @opensearch.internal + */ private class PublishResponseHandler implements ActionListener { @Override @@ -404,6 +414,11 @@ public void onFailure(Exception e) { } + /** + * An apply commit response handler. + * + * @opensearch.internal + */ private class ApplyCommitResponseHandler implements ActionListener { @Override diff --git a/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java b/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java index 7591a09b07740..c3b3b237a1944 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java @@ -284,6 +284,8 @@ private static BytesReference serializeDiffClusterState(Diff diff, * Publishing a cluster state typically involves sending the same cluster state (or diff) to every node, so the work of diffing, * serializing, and compressing the state can be done once and the results shared across publish requests. The * {@code PublicationContext} implements this sharing. + * + * @opensearch.internal */ public class PublicationContext { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java index 931f8ff228d9c..2d268b5cca779 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java @@ -170,6 +170,11 @@ public VotingConfiguration reconfigure( } } + /** + * A node to handle voting configs. + * + * @opensearch.internal + */ static class VotingConfigNode implements Comparable { final String id; final boolean live; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java b/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java index be69090e0c33c..a53f8411b2549 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AliasAction.java @@ -76,6 +76,8 @@ public String getIndex() { /** * Validate a new alias. + * + * @opensearch.internal */ @FunctionalInterface public interface NewAliasValidator { @@ -84,6 +86,8 @@ public interface NewAliasValidator { /** * Operation to add an alias to an index. + * + * @opensearch.internal */ public static class Add extends AliasAction { private final String alias; @@ -174,6 +178,8 @@ boolean apply(NewAliasValidator aliasValidator, Metadata.Builder metadata, Index /** * Operation to remove an alias from an index. + * + * @opensearch.internal */ public static class Remove extends AliasAction { private final String alias; @@ -220,6 +226,8 @@ boolean apply(NewAliasValidator aliasValidator, Metadata.Builder metadata, Index /** * Operation to remove an index. This is an "alias action" because it allows us to remove an index at the same time as we remove add an * alias to replace it. + * + * @opensearch.internal */ public static class RemoveIndex extends AliasAction { public RemoveIndex(String index) { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java index 375317b32b293..dc22af42ac801 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/AliasMetadata.java @@ -276,6 +276,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Builder of alias metadata. + * + * @opensearch.internal + */ public static class Builder { private final String alias; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java b/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java index afa0ec64b72b5..fdc6c17cb3b13 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ClusterNameExpressionResolver.java @@ -68,6 +68,11 @@ public List resolveClusterNames(Set remoteClusters, String clust } } + /** + * A wildcard expression resolver. + * + * @opensearch.internal + */ private static class WildcardExpressionResolver { private List resolve(Set remoteClusters, String clusterExpression) { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java index 4850e212b832f..9607eb181d5e7 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComponentTemplateMetadata.java @@ -156,6 +156,11 @@ public String toString() { return Strings.toString(this); } + /** + * A diff between component template metadata. + * + * @opensearch.internal + */ static class ComponentTemplateMetadataDiff implements NamedDiff { final Diff> componentTemplateDiff; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java index 5b16733e12fbb..33c50c938c3db 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplate.java @@ -289,6 +289,11 @@ public String toString() { return Strings.toString(this); } + /** + * Template for data stream. + * + * @opensearch.internal + */ public static class DataStreamTemplate implements Writeable, ToXContentObject { private static final ParseField TIMESTAMP_FIELD_FIELD = new ParseField("timestamp_field"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java index a0e228f5d3ea5..a9b8f99b0a568 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/ComposableIndexTemplateMetadata.java @@ -157,6 +157,11 @@ public String toString() { return Strings.toString(this); } + /** + * A diff between composable metadata templates. + * + * @opensearch.internal + */ static class ComposableIndexTemplateMetadataDiff implements NamedDiff { final Diff> indexTemplateDiff; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java b/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java index dffcb11619be4..f48b784e38606 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DataStream.java @@ -232,6 +232,11 @@ public int hashCode() { return Objects.hash(name, timeStampField, indices, generation); } + /** + * A timestamp field. + * + * @opensearch.internal + */ public static final class TimestampField implements Writeable, ToXContentObject { static ParseField NAME_FIELD = new ParseField("name"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java index 6045f745e1584..181ddcb21cb3b 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DataStreamMetadata.java @@ -161,6 +161,11 @@ public String toString() { return Strings.toString(this); } + /** + * Builder of data stream metadata. + * + * @opensearch.internal + */ public static class Builder { private final Map dataStreams = new HashMap<>(); @@ -175,6 +180,11 @@ public DataStreamMetadata build() { } } + /** + * A diff between data stream metadata. + * + * @opensearch.internal + */ static class DataStreamMetadataDiff implements NamedDiff { final Diff> dataStreamDiff; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java b/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java index 542af9c54283a..2372ec75445c9 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/DiffableStringMap.java @@ -90,6 +90,8 @@ public static Diff readDiffFrom(StreamInput in) throws IOExce /** * Represents differences between two DiffableStringMaps. + * + * @opensearch.internal */ public static class DiffableStringMapDiff implements Diff { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java index 77c585ca875aa..975c71ab75110 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexAbstraction.java @@ -139,6 +139,8 @@ public String getDisplayName() { /** * Represents an concrete index and encapsulates its {@link IndexMetadata} + * + * @opensearch.internal */ class Index implements IndexAbstraction { @@ -192,6 +194,8 @@ public boolean isSystem() { /** * Represents an alias and groups all {@link IndexMetadata} instances sharing the same alias name together. + * + * @opensearch.internal */ class Alias implements IndexAbstraction { @@ -329,6 +333,11 @@ private boolean isNonEmpty(List idxMetas) { } } + /** + * A data stream. + * + * @opensearch.internal + */ class DataStream implements IndexAbstraction { private final org.opensearch.cluster.metadata.DataStream dataStream; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java index de9d616d79b0b..0e42197ad77fd 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexGraveyard.java @@ -190,6 +190,8 @@ public static IndexGraveyard.Builder builder(final IndexGraveyard graveyard) { /** * A class to build an IndexGraveyard. + * + * @opensearch.internal */ public static final class Builder { private List tombstones; @@ -275,6 +277,8 @@ public IndexGraveyard build(final Settings settings) { /** * A class representing a diff of two IndexGraveyard objects. + * + * @opensearch.internal */ public static final class IndexGraveyardDiff implements NamedDiff { @@ -362,6 +366,8 @@ public String getWriteableName() { /** * An individual tombstone entry for representing a deleted index. + * + * @opensearch.internal */ public static final class Tombstone implements ToXContentObject, Writeable { @@ -460,6 +466,8 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa /** * A builder for building tombstone entries. + * + * @opensearch.internal */ private static final class Builder { private Index index; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java index 0b3b2116f6cee..ec70e642ababc 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java @@ -149,6 +149,11 @@ public class IndexMetadata implements Diffable, ToXContentFragmen EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.WRITE) ); + /** + * The state of the index. + * + * @opensearch.internal + */ public enum State { OPEN((byte) 0), CLOSE((byte) 1); @@ -281,6 +286,11 @@ public Iterator> settings() { public static final String SETTING_AUTO_EXPAND_REPLICAS = "index.auto_expand_replicas"; public static final Setting INDEX_AUTO_EXPAND_REPLICAS_SETTING = AutoExpandReplicas.SETTING; + /** + * Blocks the API. + * + * @opensearch.internal + */ public enum APIBlock implements Writeable { READ_ONLY("read_only", INDEX_READ_ONLY_BLOCK), READ("read", INDEX_READ_BLOCK), @@ -832,6 +842,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * A diff of index metadata. + * + * @opensearch.internal + */ private static class IndexMetadataDiff implements Diff { private final String index; @@ -1058,6 +1073,11 @@ public static Builder builder(IndexMetadata indexMetadata) { return new Builder(indexMetadata); } + /** + * Builder of index metadata. + * + * @opensearch.internal + */ public static class Builder { private String index; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java index 4a6df1bc0a53c..3d1609e0eb9c0 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexNameExpressionResolver.java @@ -773,6 +773,11 @@ public boolean isSystemIndexAccessAllowed() { return Booleans.parseBoolean(threadContext.getHeader(SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY), true); } + /** + * Context for the resolver. + * + * @opensearch.internal + */ public static class Context { private final ClusterState state; @@ -912,6 +917,8 @@ private interface ExpressionResolver { /** * Resolves alias/index name expressions with wildcards into the corresponding concrete indices/aliases + * + * @opensearch.internal */ static final class WildcardExpressionResolver implements ExpressionResolver { @@ -1192,6 +1199,11 @@ private static List resolveEmptyOrTrivialWildcard(IndicesOptions options } } + /** + * A date math expression resolver. + * + * @opensearch.internal + */ public static final class DateMathExpressionResolver implements ExpressionResolver { private static final DateFormatter DEFAULT_DATE_FORMATTER = DateFormatter.forPattern("uuuu.MM.dd"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java index 367a15560200f..976edb0bbad47 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexTemplateMetadata.java @@ -270,6 +270,11 @@ public String toString() { } } + /** + * Builder of index template metadata. + * + * @opensearch.internal + */ public static class Builder { private static final Set VALID_FIELDS = Sets.newHashSet( diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java b/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java index b14e970360dce..23500f7ca4ce0 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Manifest.java @@ -233,6 +233,11 @@ public boolean isGlobalGenerationMissing() { return globalGeneration == MISSING_GLOBAL_GENERATION; } + /** + * An index entry. + * + * @opensearch.internal + */ private static final class IndexEntry implements ToXContentFragment { private static final ParseField INDEX_GENERATION_PARSE_FIELD = new ParseField("generation"); private static final ParseField INDEX_PARSE_FIELD = new ParseField("index"); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java index bec72b696acdd..5f7e98e9e1199 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/Metadata.java @@ -112,6 +112,11 @@ public class Metadata implements Iterable, Diffable, To public static final String UNKNOWN_CLUSTER_UUID = "_na_"; public static final Pattern NUMBER_PATTERN = Pattern.compile("[0-9]+$"); + /** + * Context of the XContent. + * + * @opensearch.internal + */ public enum XContentContext { /* Custom metadata should be returns as part of API call */ API, @@ -146,6 +151,11 @@ public enum XContentContext { */ public static EnumSet ALL_CONTEXTS = EnumSet.allOf(XContentContext.class); + /** + * Custom metadata. + * + * @opensearch.internal + */ public interface Custom extends NamedDiffable, ToXContentFragment, ClusterState.FeatureAware { EnumSet context(); @@ -920,6 +930,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * A diff of metadata. + * + * @opensearch.internal + */ private static class MetadataDiff implements Diff { private final long version; @@ -1088,6 +1103,11 @@ public static Builder builder(Metadata metadata) { return new Builder(metadata); } + /** + * Builder of metadata. + * + * @opensearch.internal + */ public static class Builder { private String clusterUUID; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java index 66fe3c5ce61dd..412d4dba628cb 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateDataStreamService.java @@ -125,6 +125,11 @@ public ClusterState createDataStream(CreateDataStreamClusterStateUpdateRequest r return createDataStream(metadataCreateIndexService, current, request); } + /** + * A request to create a data stream cluster state update + * + * @opensearch.internal + */ public static final class CreateDataStreamClusterStateUpdateRequest extends ClusterStateUpdateRequest { private final String name; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java index d8715d07a31a3..4f1000e3407fd 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexStateService.java @@ -583,6 +583,8 @@ public TimeValue timeout() { * This step iterates over the indices previously blocked and sends a {@link TransportVerifyShardBeforeCloseAction} to each shard. If * this action succeed then the shard is considered to be ready for closing. When all shards of a given index are ready for closing, * the index is considered ready to be closed. + * + * @opensearch.internal */ class WaitForClosedBlocksApplied extends ActionRunnable> { @@ -715,6 +717,8 @@ public void onFailure(Exception e) { /** * Helper class that coordinates with shards to ensure that blocks have been properly applied to all shards using * {@link TransportVerifyShardIndexBlockAction}. + * + * @opensearch.metadata */ class WaitForBlocksApplied extends ActionRunnable> { diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java index c14170e358f4c..9c734fd7b3bdc 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexTemplateService.java @@ -1498,6 +1498,11 @@ private void validate(String name, @Nullable Settings settings, List ind } } + /** + * Listener for putting metadata in the template + * + * @opensearch.internal + */ public interface PutListener { void onResponse(PutResponse response); @@ -1505,6 +1510,11 @@ public interface PutListener { void onFailure(Exception e); } + /** + * A PUT request. + * + * @opensearch.internal + */ public static class PutRequest { final String name; final String cause; @@ -1564,6 +1574,11 @@ public PutRequest version(Integer version) { } } + /** + * The PUT response. + * + * @opensearch.internal + */ public static class PutResponse { private final boolean acknowledged; @@ -1576,6 +1591,11 @@ public boolean acknowledged() { } } + /** + * A remove Request. + * + * @opensearch.internal + */ public static class RemoveRequest { final String name; TimeValue masterTimeout = MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT; @@ -1590,6 +1610,11 @@ public RemoveRequest masterTimeout(TimeValue masterTimeout) { } } + /** + * A remove Response. + * + * @opensearch.internal + */ public static class RemoveResponse { private final boolean acknowledged; @@ -1602,6 +1627,11 @@ public boolean acknowledged() { } } + /** + * A remove listener. + * + * @opensearch.internal + */ public interface RemoveListener { void onResponse(RemoveResponse response); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java b/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java index 85568d69639cb..c708f3830f431 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/SystemIndexMetadataUpgradeService.java @@ -94,6 +94,11 @@ public void clusterChanged(ClusterChangedEvent event) { } } + /** + * Task to update system index metadata. + * + * @opensearch.internal + */ public class SystemIndexMetadataUpdateTask extends ClusterStateUpdateTask { @Override diff --git a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeFilters.java b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeFilters.java index 8ed4eb27ba17b..b47ad43d44efb 100644 --- a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeFilters.java +++ b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeFilters.java @@ -52,6 +52,11 @@ */ public class DiscoveryNodeFilters { + /** + * Operation type. + * + * @opensearch.internal + */ public enum OpType { AND, OR diff --git a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java index a209c51ea5245..0304a51f330c8 100644 --- a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java +++ b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java @@ -515,6 +515,11 @@ public String toString() { return sb.toString(); } + /** + * Delta between nodes. + * + * @opensearch.internal + */ public static class Delta { private final String localNodeId; @@ -658,6 +663,11 @@ public static Builder builder(DiscoveryNodes nodes) { return new Builder(nodes); } + /** + * Builder of a map of discovery nodes. + * + * @opensearch.internal + */ public static class Builder { private final ImmutableOpenMap.Builder nodes; diff --git a/server/src/main/java/org/opensearch/cluster/routing/IndexRoutingTable.java b/server/src/main/java/org/opensearch/cluster/routing/IndexRoutingTable.java index 121c104d2bca2..9eca838bb7945 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/IndexRoutingTable.java +++ b/server/src/main/java/org/opensearch/cluster/routing/IndexRoutingTable.java @@ -365,6 +365,11 @@ public static Builder builder(Index index) { return new Builder(index); } + /** + * Builder of a routing table. + * + * @opensearch.internal + */ public static class Builder { private final Index index; diff --git a/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java b/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java index 1be7f5295f866..d4597f47d9a6c 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java +++ b/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java @@ -698,6 +698,11 @@ public int shardsMatchingPredicateCount(Predicate predicate) { return count; } + /** + * Builder of an index shard routing table. + * + * @opensearch.internal + */ public static class Builder { private ShardId shardId; diff --git a/server/src/main/java/org/opensearch/cluster/routing/RecoverySource.java b/server/src/main/java/org/opensearch/cluster/routing/RecoverySource.java index 1483831c82a35..6ffa155729c7a 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/RecoverySource.java +++ b/server/src/main/java/org/opensearch/cluster/routing/RecoverySource.java @@ -106,6 +106,11 @@ protected void writeAdditionalFields(StreamOutput out) throws IOException { } + /** + * Type of recovery. + * + * @opensearch.internal + */ public enum Type { EMPTY_STORE, EXISTING_STORE, @@ -141,6 +146,8 @@ public int hashCode() { /** * Recovery from a fresh copy + * + * @opensearch.internal */ public static final class EmptyStoreRecoverySource extends RecoverySource { public static final EmptyStoreRecoverySource INSTANCE = new EmptyStoreRecoverySource(); @@ -158,6 +165,8 @@ public String toString() { /** * Recovery from an existing on-disk store + * + * @opensearch.internal */ public static final class ExistingStoreRecoverySource extends RecoverySource { /** @@ -211,6 +220,8 @@ public boolean expectEmptyRetentionLeases() { /** * recovery from other shards on same node (shrink index action) + * + * @opensearch.internal */ public static class LocalShardsRecoverySource extends RecoverySource { @@ -232,6 +243,8 @@ public String toString() { /** * recovery from a snapshot + * + * @opensearch.internal */ public static class SnapshotRecoverySource extends RecoverySource { @@ -338,6 +351,8 @@ public int hashCode() { /** * peer recovery from a primary shard + * + * @opensearch.internal */ public static class PeerRecoverySource extends RecoverySource { diff --git a/server/src/main/java/org/opensearch/cluster/routing/RoutingChangesObserver.java b/server/src/main/java/org/opensearch/cluster/routing/RoutingChangesObserver.java index 6b2cd59a6df15..1ec572f7f8cc4 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/RoutingChangesObserver.java +++ b/server/src/main/java/org/opensearch/cluster/routing/RoutingChangesObserver.java @@ -137,6 +137,11 @@ public void initializedReplicaReinitialized(ShardRouting oldReplica, ShardRoutin } } + /** + * Observer of routing changes. + * + * @opensearch.internal + */ class DelegatingRoutingChangesObserver implements RoutingChangesObserver { private final RoutingChangesObserver[] routingChangesObservers; diff --git a/server/src/main/java/org/opensearch/cluster/routing/RoutingNodes.java b/server/src/main/java/org/opensearch/cluster/routing/RoutingNodes.java index 9b7d912c28598..986df494917c0 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/RoutingNodes.java +++ b/server/src/main/java/org/opensearch/cluster/routing/RoutingNodes.java @@ -893,6 +893,11 @@ public int size() { return nodesToShards.size(); } + /** + * Unassigned shard list. + * + * @opensearch.internal + */ public static final class UnassignedShards implements Iterable { private final RoutingNodes nodes; @@ -989,6 +994,11 @@ public void ignoreShard(ShardRouting shard, AllocationStatus allocationStatus, R ignored.add(shard); } + /** + * An unassigned iterator. + * + * @opensearch.internal + */ public class UnassignedIterator implements Iterator, ExistingShardsAllocator.UnassignedAllocationHandler { private final ListIterator iterator; @@ -1369,6 +1379,11 @@ public void remove() { } } + /** + * A collection of recoveries. + * + * @opensearch.internal + */ private static final class Recoveries { private static final Recoveries EMPTY = new Recoveries(); private int incoming = 0; diff --git a/server/src/main/java/org/opensearch/cluster/routing/RoutingTable.java b/server/src/main/java/org/opensearch/cluster/routing/RoutingTable.java index dc4210a42c78a..8c2d3ddb0697f 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/RoutingTable.java +++ b/server/src/main/java/org/opensearch/cluster/routing/RoutingTable.java @@ -424,6 +424,8 @@ public static Builder builder(RoutingTable routingTable) { /** * Builder for the routing table. Note that build can only be called one time. + * + * @opensearch.internal */ public static class Builder { diff --git a/server/src/main/java/org/opensearch/cluster/routing/UnassignedInfo.java b/server/src/main/java/org/opensearch/cluster/routing/UnassignedInfo.java index 0f5028d2295f8..49c18fe44cc04 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/UnassignedInfo.java +++ b/server/src/main/java/org/opensearch/cluster/routing/UnassignedInfo.java @@ -81,6 +81,8 @@ public final class UnassignedInfo implements ToXContentFragment, Writeable { *

* Note, ordering of the enum is important, make sure to add new values * at the end and handle version serialization properly. + * + * @opensearch.internal */ public enum Reason { /** @@ -155,6 +157,8 @@ public enum Reason { * * Note, ordering of the enum is important, make sure to add new values * at the end and handle version serialization properly. + * + * @opensearch.internal */ public enum AllocationStatus implements Writeable { /** diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java index 0c04860f09682..1c6e4732a2ab7 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java @@ -742,6 +742,8 @@ public int getNumberOfInFlightFetches() { /** * this class is used to describe results of applying a set of * {@link org.opensearch.cluster.routing.allocation.command.AllocationCommand} + * + * @opensearch.internal */ public static class CommandsResult { diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/DiskThresholdSettings.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/DiskThresholdSettings.java index 9cabffbcd80c0..0ce0b1bd7b688 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/DiskThresholdSettings.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/DiskThresholdSettings.java @@ -142,6 +142,11 @@ public DiskThresholdSettings(Settings settings, ClusterSettings clusterSettings) clusterSettings.addSettingsUpdateConsumer(CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING, this::setEnabled); } + /** + * Validates a low disk watermark. + * + * @opensearch.internal + */ static final class LowDiskWatermarkValidator implements Setting.Validator { @Override @@ -167,6 +172,11 @@ public Iterator> settings() { } + /** + * Validates a high disk watermark. + * + * @opensearch.internal + */ static final class HighDiskWatermarkValidator implements Setting.Validator { @Override @@ -192,6 +202,11 @@ public Iterator> settings() { } + /** + * Validates the flood stage. + * + * @opensearch.internal + */ static final class FloodStageValidator implements Setting.Validator { @Override diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/NodeAllocationResult.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/NodeAllocationResult.java index 10f9f3b93d685..e600dc50177bb 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/NodeAllocationResult.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/NodeAllocationResult.java @@ -188,7 +188,11 @@ public int compareTo(NodeAllocationResult other) { return nodeResultComparator.compare(this, other); } - /** A class that captures metadata about a shard store on a node. */ + /** + * A class that captures metadata about a shard store on a node. + * + * @opensearch.internal + */ public static final class ShardStoreInfo implements ToXContentFragment, Writeable { private final boolean inSync; @Nullable diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java index 959cef1931fc4..3ac22f5eee362 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java @@ -315,6 +315,11 @@ public void setHasPendingAsyncFetch() { this.hasPendingAsyncFetch = true; } + /** + * Debug mode. + * + * @opensearch.internal + */ public enum DebugMode { /** * debug mode is off diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index 6f500ab1538bb..181910e3ac1c4 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -291,6 +291,8 @@ float weight(Balancer balancer, ModelNode node, String index) { /** * A {@link Balancer} + * + * @opensearch.internal */ public static class Balancer { private final Logger logger; @@ -1192,6 +1194,11 @@ private boolean tryRelocateShard(ModelNode minNode, ModelNode maxNode, String id } + /** + * A model node. + * + * @opensearch.internal + */ public static class ModelNode implements Iterable { private final Map indices = new HashMap<>(); private int numShards = 0; @@ -1270,6 +1277,11 @@ public boolean containsShard(ShardRouting shard) { } + /** + * A model index. + * + * @opensearch.internal + */ static final class ModelIndex implements Iterable { private final String id; private final Set shards = new HashSet<>(4); // expect few shards of same index to be allocated on same node @@ -1322,6 +1334,11 @@ public boolean containsShard(ShardRouting shard) { } } + /** + * A node sorter. + * + * @opensearch.internal + */ static final class NodeSorter extends IntroSorter { final ModelNode[] modelNodes; diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateEmptyPrimaryAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateEmptyPrimaryAllocationCommand.java index 31188685ee677..aef86a4e1a59b 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateEmptyPrimaryAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateEmptyPrimaryAllocationCommand.java @@ -98,6 +98,11 @@ public static AllocateEmptyPrimaryAllocationCommand fromXContent(XContentParser return new Builder().parse(parser).build(); } + /** + * Builder for an empty primary allocation. + * + * @opensearch.internal + */ public static class Builder extends BasePrimaryAllocationCommand.Builder { @Override diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateReplicaAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateReplicaAllocationCommand.java index 5d83a464c9ac2..43a100446410f 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateReplicaAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateReplicaAllocationCommand.java @@ -88,6 +88,11 @@ public static AllocateReplicaAllocationCommand fromXContent(XContentParser parse return new Builder().parse(parser).build(); } + /** + * A builder for the command. + * + * @opensearch.internal + */ protected static class Builder extends AbstractAllocateAllocationCommand.Builder { @Override diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateStalePrimaryAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateStalePrimaryAllocationCommand.java index e9b79d5ce730e..493f20ec5e4ec 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateStalePrimaryAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocateStalePrimaryAllocationCommand.java @@ -95,6 +95,11 @@ public static AllocateStalePrimaryAllocationCommand fromXContent(XContentParser return new Builder().parse(parser).build(); } + /** + * Builder for a stale primary allocation + * + * @opensearch.internal + */ public static class Builder extends BasePrimaryAllocationCommand.Builder { @Override diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/BasePrimaryAllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/BasePrimaryAllocationCommand.java index a39433866863a..6f0629bcf2520 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/BasePrimaryAllocationCommand.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/BasePrimaryAllocationCommand.java @@ -85,6 +85,11 @@ public boolean acceptDataLoss() { return acceptDataLoss; } + /** + * Base builder class for the primary allocation command. + * + * @opensearch.internal + */ protected abstract static class Builder extends AbstractAllocateAllocationCommand.Builder { protected boolean acceptDataLoss; diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java index 58b9ba6476301..75c4d2aa3953d 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java @@ -78,6 +78,8 @@ public class ClusterRebalanceAllocationDecider extends AllocationDecider { /** * An enum representation for the configured re-balance type. + * + * @opensearch.internal */ public enum ClusterRebalanceType { /** diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/Decision.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/Decision.java index 52e02c6b0d049..b105411083601 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/Decision.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/Decision.java @@ -97,6 +97,8 @@ public static Decision readFrom(StreamInput in) throws IOException { /** * This enumeration defines the * possible types of decisions + * + * @opensearch.internal */ public enum Type implements Writeable { YES(1), @@ -170,6 +172,8 @@ public boolean canPremptivelyReturn() { /** * Simple class representing a single decision + * + * @opensearch.internal */ public static class Single extends Decision implements ToXContentObject { private Type type; @@ -287,6 +291,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * Simple class representing a list of decisions + * + * @opensearch.internal */ public static class Multi extends Decision implements ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/EnableAllocationDecider.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/EnableAllocationDecider.java index ebeed170ca426..a51546920c6a0 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/EnableAllocationDecider.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/EnableAllocationDecider.java @@ -282,6 +282,8 @@ private static String setting(Rebalance rebalance, boolean usedIndexSetting) { * {@link EnableAllocationDecider#CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING} / * {@link EnableAllocationDecider#INDEX_ROUTING_ALLOCATION_ENABLE_SETTING} * via cluster / index settings. + * + * @opensearch.internal */ public enum Allocation { @@ -314,6 +316,8 @@ public String toString() { * {@link EnableAllocationDecider#CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING} / * {@link EnableAllocationDecider#INDEX_ROUTING_REBALANCE_ENABLE_SETTING} * via cluster / index settings. + * + * @opensearch.internal */ public enum Rebalance { diff --git a/server/src/main/java/org/opensearch/common/LocalTimeOffset.java b/server/src/main/java/org/opensearch/common/LocalTimeOffset.java index ce2bd2f21ce37..7e89641927ed5 100644 --- a/server/src/main/java/org/opensearch/common/LocalTimeOffset.java +++ b/server/src/main/java/org/opensearch/common/LocalTimeOffset.java @@ -148,6 +148,11 @@ public final long localToUtcInThisOffset(long localMillis) { */ public abstract long localToUtc(long localMillis, Strategy strat); + /** + * Strategy for a local time + * + * @opensearch.internal + */ public interface Strategy { /** * Handle a local time that never actually happened because a "gap" diff --git a/server/src/main/java/org/opensearch/common/Rounding.java b/server/src/main/java/org/opensearch/common/Rounding.java index f5ca75882eac0..c396f6c88fd57 100644 --- a/server/src/main/java/org/opensearch/common/Rounding.java +++ b/server/src/main/java/org/opensearch/common/Rounding.java @@ -81,6 +81,11 @@ public abstract class Rounding implements Writeable { private static final Logger logger = LogManager.getLogger(Rounding.class); + /** + * A Date Time Unit + * + * @opensearch.internal + */ public enum DateTimeUnit { WEEK_OF_WEEKYEAR((byte) 1, "week", IsoFields.WEEK_OF_WEEK_BASED_YEAR, true, TimeUnit.DAYS.toMillis(7)) { private final long extraLocalOffsetLookup = TimeUnit.DAYS.toMillis(7); @@ -262,6 +267,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * A strategy for rounding milliseconds since epoch. + * + * @opensearch.internal */ public interface Prepared { /** diff --git a/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java b/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java index 8eaf7aba99945..4cbd375e8c1ff 100644 --- a/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java +++ b/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java @@ -69,6 +69,11 @@ public interface CircuitBreaker { */ String IN_FLIGHT_REQUESTS = "in_flight_requests"; + /** + * The type of breaker + * + * @opensearch.internal + */ enum Type { // A regular or ChildMemoryCircuitBreaker MEMORY, @@ -91,6 +96,11 @@ public static Type parseValue(String value) { } } + /** + * The breaker durability + * + * @opensearch.internal + */ enum Durability { // The condition that tripped the circuit breaker fixes itself eventually. TRANSIENT, diff --git a/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java b/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java index f8dc8fa4a6d0f..454f7b5a96a64 100644 --- a/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java +++ b/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java @@ -38,6 +38,11 @@ * @opensearch.internal */ public class RemovalNotification { + /** + * Reason for notification removal + * + * @opensearch.internal + */ public enum RemovalReason { REPLACED, INVALIDATED, diff --git a/server/src/main/java/org/opensearch/common/collect/HppcMaps.java b/server/src/main/java/org/opensearch/common/collect/HppcMaps.java index 7d78b71421069..2fd7316accf6e 100644 --- a/server/src/main/java/org/opensearch/common/collect/HppcMaps.java +++ b/server/src/main/java/org/opensearch/common/collect/HppcMaps.java @@ -147,7 +147,17 @@ public Iterator iterator() { }; } + /** + * Object for the map + * + * @opensearch.internal + */ public static final class Object { + /** + * Integer type for the map + * + * @opensearch.internal + */ public static final class Integer { public static ObjectIntHashMap ensureNoNullKeys(int capacity, float loadFactor) { return new ObjectIntHashMap(capacity, loadFactor) { diff --git a/server/src/main/java/org/opensearch/common/collect/Iterators.java b/server/src/main/java/org/opensearch/common/collect/Iterators.java index 9536bbb1ba46b..c7e7ae6a44a21 100644 --- a/server/src/main/java/org/opensearch/common/collect/Iterators.java +++ b/server/src/main/java/org/opensearch/common/collect/Iterators.java @@ -35,6 +35,11 @@ import java.util.Iterator; import java.util.NoSuchElementException; +/** + * Iterators utility class. + * + * @opensearch.internal + */ public class Iterators { public static Iterator concat(Iterator... iterators) { if (iterators == null) { diff --git a/server/src/main/java/org/opensearch/common/component/Lifecycle.java b/server/src/main/java/org/opensearch/common/component/Lifecycle.java index b0db6435d6126..fb12c1fc9ac4b 100644 --- a/server/src/main/java/org/opensearch/common/component/Lifecycle.java +++ b/server/src/main/java/org/opensearch/common/component/Lifecycle.java @@ -77,6 +77,11 @@ */ public class Lifecycle { + /** + * State in the lifecycle + * + * @opensearch.internal + */ public enum State { INITIALIZED, STOPPED, diff --git a/server/src/main/java/org/opensearch/common/geo/GeoUtils.java b/server/src/main/java/org/opensearch/common/geo/GeoUtils.java index 9cff3e56b56e3..5534967d559d6 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoUtils.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoUtils.java @@ -421,6 +421,8 @@ public static GeoPoint parseGeoPoint(Object value, GeoPoint point, final boolean /** * Represents the point of the geohash cell that should be used as the value of geohash + * + * @opensearch.internal */ public enum EffectivePoint { TOP_LEFT, diff --git a/server/src/main/java/org/opensearch/common/geo/builders/ShapeBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/ShapeBuilder.java index 4e7524400958a..92681ce4c4700 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/ShapeBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/ShapeBuilder.java @@ -420,6 +420,11 @@ public int compare(Edge o1, Edge o2) { } } + /** + * The orientation of the vertices + * + * @opensearch.internal + */ public enum Orientation { LEFT, RIGHT; diff --git a/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java b/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java index 1dd3c83b1474e..f0edad2df8bcc 100644 --- a/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java @@ -314,6 +314,11 @@ private boolean isOkayDuplicate(Binding original, BindingImpl binding) { ); // TODO(jessewilson): fix BuiltInModule, then add Stage + /** + * A listener for a process creation + * + * @opensearch.internal + */ interface CreationListener { void notify(Errors errors); } diff --git a/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java b/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java index c01f155c399e4..f004f5e418b26 100644 --- a/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java @@ -676,6 +676,8 @@ SingleParameterInjector createParameterInjector(final Dependency depen /** * Invokes a method. + * + * @opensearch.internal */ interface MethodInvoker { Object invoke(Object target, Object... parameters) throws IllegalAccessException, InvocationTargetException; diff --git a/server/src/main/java/org/opensearch/common/inject/Key.java b/server/src/main/java/org/opensearch/common/inject/Key.java index 56730cbfa495a..cd305353a555d 100644 --- a/server/src/main/java/org/opensearch/common/inject/Key.java +++ b/server/src/main/java/org/opensearch/common/inject/Key.java @@ -325,6 +325,11 @@ Key withoutAttributes() { return new Key<>(typeLiteral, annotationStrategy.withoutAttributes()); } + /** + * Strategy for annotations + * + * @opensearch.internal + */ interface AnnotationStrategy { Annotation getAnnotation(); diff --git a/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java b/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java index 48b33d9df5f09..f0cca2990b407 100644 --- a/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java +++ b/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java @@ -270,6 +270,8 @@ Type resolveType(Type toResolve) { * * @param supertype a superclass of, or interface implemented by, this. * @since 2.0 + * + * @opensearch.internal */ public TypeLiteral getSupertype(Class supertype) { if (!supertype.isAssignableFrom(rawType)) { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/MoreTypes.java b/server/src/main/java/org/opensearch/common/inject/internal/MoreTypes.java index 5ccdc0c59908e..6b9feedc9174e 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/MoreTypes.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/MoreTypes.java @@ -677,6 +677,8 @@ public String toString() { /** * A type formed from other types, such as arrays, parameterized types or wildcard types + * + * @opensearch.internal */ private interface CompositeType { /** diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java index 387f9ba0f3f6c..c88b2281107ed 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java @@ -406,6 +406,11 @@ private static boolean isStatic(Member member) { return Modifier.isStatic(member.getModifiers()); } + /** + * Factory for the injection point + * + * @opensearch.internal + */ private interface Factory { Factory FIELDS = new Factory() { @Override diff --git a/server/src/main/java/org/opensearch/common/inject/util/Modules.java b/server/src/main/java/org/opensearch/common/inject/util/Modules.java index ff2f2e7d0dac1..ae37cb3d29a68 100644 --- a/server/src/main/java/org/opensearch/common/inject/util/Modules.java +++ b/server/src/main/java/org/opensearch/common/inject/util/Modules.java @@ -130,6 +130,8 @@ public void configure(Binder binder) { /** * See the EDSL example at {@link Modules#override(Module[]) override()}. + * + * @opensearch.internal */ public interface OverriddenModuleBuilder { diff --git a/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java b/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java index 57e222680ce41..98b4ebbc330da 100644 --- a/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java +++ b/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java @@ -105,6 +105,11 @@ public DeprecationLoggerBuilder deprecate(final String key, final String msg, fi return new DeprecationLoggerBuilder().withDeprecation(key, msg, params); } + /** + * The builder for the deprecation logger + * + * @opensearch.internal + */ public class DeprecationLoggerBuilder { public DeprecationLoggerBuilder withDeprecation(String key, String msg, Object[] params) { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/FieldValueFactorFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/FieldValueFactorFunction.java index 3a21246da06c0..f60fd16a488a1 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/FieldValueFactorFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/FieldValueFactorFunction.java @@ -176,6 +176,8 @@ protected int doHashCode() { /** * The Type class encapsulates the modification types that can be applied * to the score/value product. + * + * @opensearch.internal */ public enum Modifier implements Writeable { NONE { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/FunctionScoreQuery.java b/server/src/main/java/org/opensearch/common/lucene/search/function/FunctionScoreQuery.java index e52f77bf49216..66ac66b004697 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/FunctionScoreQuery.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/FunctionScoreQuery.java @@ -141,6 +141,11 @@ public float getWeight() { } } + /** + * The mode of the score + * + * @opensearch.internal + */ public enum ScoreMode implements Writeable { FIRST, AVG, diff --git a/server/src/main/java/org/opensearch/common/network/NetworkService.java b/server/src/main/java/org/opensearch/common/network/NetworkService.java index 6a630dceadc18..e50c71af4f483 100644 --- a/server/src/main/java/org/opensearch/common/network/NetworkService.java +++ b/server/src/main/java/org/opensearch/common/network/NetworkService.java @@ -113,6 +113,8 @@ public final class NetworkService { /** * A custom name resolver can support custom lookup keys (my_net_key:ipv4) and also change * the default inet address used in case no settings is provided. + * + * @opensearch.internal */ public interface CustomNameResolver { /** diff --git a/server/src/main/java/org/opensearch/common/path/PathTrie.java b/server/src/main/java/org/opensearch/common/path/PathTrie.java index 360da4c58bda9..7cb7b46acfafe 100644 --- a/server/src/main/java/org/opensearch/common/path/PathTrie.java +++ b/server/src/main/java/org/opensearch/common/path/PathTrie.java @@ -77,6 +77,11 @@ enum TrieMatchingMode { TrieMatchingMode.WILDCARD_ROOT_NODES_ALLOWED ); + /** + * Decoder for the path + * + * @opensearch.internal + */ public interface Decoder { String decode(String value); } @@ -93,6 +98,11 @@ public PathTrie(Decoder decoder) { root = new TrieNode(SEPARATOR, null, WILDCARD); } + /** + * Node for the trie + * + * @opensearch.internal + */ public class TrieNode { private transient String key; private transient T value; diff --git a/server/src/main/java/org/opensearch/common/recycler/Recycler.java b/server/src/main/java/org/opensearch/common/recycler/Recycler.java index 0c9127bf3ebde..0b0c98772a77c 100644 --- a/server/src/main/java/org/opensearch/common/recycler/Recycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/Recycler.java @@ -42,10 +42,20 @@ */ public interface Recycler { + /** + * Base factory interface + * + * @opensearch.internal + */ interface Factory { Recycler build(); } + /** + * Generic for recycler + * + * @opensearch.internal + */ interface C { /** Create a new empty instance of the given size. */ @@ -58,6 +68,11 @@ interface C { void destroy(T value); } + /** + * Generic releasable + * + * @opensearch.internal + */ interface V extends Releasable { /** Reference to the value. */ diff --git a/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java b/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java index 640e8cbca469a..a75d4f035b790 100644 --- a/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java @@ -631,6 +631,8 @@ void validate( * Transactional interface to update settings. * @see Setting * @param the type of the value of the setting + * + * @opensearch.internal */ public interface SettingUpdater { diff --git a/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java b/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java index ae5875cc8aaa0..76b5642949e03 100644 --- a/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java +++ b/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java @@ -162,6 +162,8 @@ private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { * Strategy interface used to resolve replacement values for placeholders contained in Strings. * * @see PropertyPlaceholder + * + * @opensearch.internal */ interface PlaceholderResolver { diff --git a/server/src/main/java/org/opensearch/common/settings/Setting.java b/server/src/main/java/org/opensearch/common/settings/Setting.java index 39cf0b9a4f32d..f86fe6771dfcd 100644 --- a/server/src/main/java/org/opensearch/common/settings/Setting.java +++ b/server/src/main/java/org/opensearch/common/settings/Setting.java @@ -102,6 +102,11 @@ */ public class Setting implements ToXContentObject { + /** + * Property of the setting + * + * @opensearch.internal + */ public enum Property { /** * should be filtered in some api (mask password/credentials) @@ -620,6 +625,8 @@ public Setting getConcreteSetting(String key) { /** * Allows a setting to declare a dependency on another setting being set. Optionally, a setting can validate the value of the dependent * setting. + * + * @opensearch.internal */ public interface SettingDependency { @@ -767,6 +774,8 @@ public String toString() { /** * Allows an affix setting to declare a dependency on another affix setting. + * + * @opensearch.internal */ public interface AffixSettingDependency extends SettingDependency { @@ -1007,6 +1016,8 @@ public Map getAsMap(Settings settings) { * {@link #settings()}} to their values. All these values come from the same {@link Settings} instance. * * @param the type of the {@link Setting} + * + * @opensearch.internal */ @FunctionalInterface public interface Validator { @@ -2247,6 +2258,11 @@ private static AffixSetting affixKeySetting( return new AffixSetting<>(key, delegate, delegateFactory, dependencies); } + /** + * Key for the setting + * + * @opensearch.internal + */ public interface Key { boolean match(String key); } @@ -2287,6 +2303,11 @@ public int hashCode() { } } + /** + * Settings Group keys + * + * @opensearch.internal + */ public static final class GroupKey extends SimpleKey { public GroupKey(String key) { super(key); @@ -2301,6 +2322,11 @@ public boolean match(String toTest) { } } + /** + * List settings key + * + * @opensearch.internal + */ public static final class ListKey extends SimpleKey { private final Pattern pattern; @@ -2318,6 +2344,8 @@ public boolean match(String toTest) { /** * A key that allows for static pre and suffix. This is used for settings * that have dynamic namespaces like for different accounts etc. + * + * @opensearch.internal */ public static final class AffixKey implements Key { private final Pattern pattern; diff --git a/server/src/main/java/org/opensearch/common/transport/PortsRange.java b/server/src/main/java/org/opensearch/common/transport/PortsRange.java index c3ab5084e6e01..30ab5e355f090 100644 --- a/server/src/main/java/org/opensearch/common/transport/PortsRange.java +++ b/server/src/main/java/org/opensearch/common/transport/PortsRange.java @@ -94,6 +94,11 @@ public boolean iterate(PortCallback callback) throws NumberFormatException { return success; } + /** + * Callback for the port + * + * @opensearch.internal + */ public interface PortCallback { boolean onPortNumber(int portNumber); } diff --git a/server/src/main/java/org/opensearch/common/util/CancellableThreads.java b/server/src/main/java/org/opensearch/common/util/CancellableThreads.java index d52d717865dbf..bb9ae9502f746 100644 --- a/server/src/main/java/org/opensearch/common/util/CancellableThreads.java +++ b/server/src/main/java/org/opensearch/common/util/CancellableThreads.java @@ -180,10 +180,20 @@ public synchronized void cancel(String reason) { threads.clear(); } + /** + * Interruptible interface + * + * @opensearch.internal + */ public interface Interruptible extends IOInterruptible { void run() throws InterruptedException; } + /** + * IO Interruptible + * + * @opensearch.internal + */ public interface IOInterruptible { void run() throws IOException, InterruptedException; } @@ -211,6 +221,11 @@ public synchronized void setOnCancel(OnCancel onCancel) { this.onCancel.set(onCancel); } + /** + * Called when a thread is cancelled + * + * @opensearch.internal + */ @FunctionalInterface public interface OnCancel { /** diff --git a/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java b/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java index 9b8f9621fb9c1..9d654e96779bf 100644 --- a/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java +++ b/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java @@ -202,6 +202,11 @@ protected void removeAndAdd(long index) { assert removed == null; } + /** + * Cursor for the map + * + * @opensearch.internal + */ public static final class Cursor { public long index; public long key; diff --git a/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java b/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java index d0f660b9ac445..6d786e85bab1c 100644 --- a/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java +++ b/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java @@ -231,6 +231,11 @@ private static Recycler build(Type type, int limit, int availableProcesso return recycler; } + /** + * Type of the page cache recycler + * + * @opensearch.internal + */ public enum Type { QUEUE { @Override diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchThreadPoolExecutor.java b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchThreadPoolExecutor.java index 2ebf8a1cc970c..7fda911fe7959 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchThreadPoolExecutor.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchThreadPoolExecutor.java @@ -114,6 +114,11 @@ protected synchronized void terminated() { } } + /** + * Listener on shut down + * + * @opensearch.internal + */ public interface ShutdownListener { void onTerminated(); } diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java index 02a3b24e028a8..5e2381c949c00 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContext.java @@ -486,6 +486,11 @@ public boolean isSystemContext() { return threadLocal.get().isSystemContext; } + /** + * A stored context + * + * @opensearch.internal + */ @FunctionalInterface public interface StoredContext extends AutoCloseable { @Override diff --git a/server/src/main/java/org/opensearch/discovery/PeerFinder.java b/server/src/main/java/org/opensearch/discovery/PeerFinder.java index 45b21b1eaa5da..03cdc4ba68cc9 100644 --- a/server/src/main/java/org/opensearch/discovery/PeerFinder.java +++ b/server/src/main/java/org/opensearch/discovery/PeerFinder.java @@ -228,6 +228,11 @@ public List getLastResolvedAddresses() { return lastResolvedAddresses; } + /** + * Transport address connector interface. + * + * @opensearch.internal + */ public interface TransportAddressConnector { /** * Identify the node at the given address and, if it is a cluster-manager node and not the local node then establish a full connection to it. @@ -235,6 +240,11 @@ public interface TransportAddressConnector { void connectToRemoteMasterNode(TransportAddress transportAddress, ActionListener listener); } + /** + * Resolves the configured unicast host. + * + * @opensearch.internal + */ public interface ConfiguredHostsResolver { /** * Attempt to resolve the configured unicast hosts list to a list of transport addresses. diff --git a/server/src/main/java/org/opensearch/env/NodeEnvironment.java b/server/src/main/java/org/opensearch/env/NodeEnvironment.java index 54bd376371b86..3da2cce8a2620 100644 --- a/server/src/main/java/org/opensearch/env/NodeEnvironment.java +++ b/server/src/main/java/org/opensearch/env/NodeEnvironment.java @@ -111,6 +111,11 @@ * @opensearch.internal */ public final class NodeEnvironment implements Closeable { + /** + * A node path. + * + * @opensearch.internal + */ public static class NodePath { /* ${data.paths}/nodes/{node.id} */ public final Path path; @@ -214,6 +219,11 @@ public String toString() { public static final String INDICES_FOLDER = "indices"; public static final String NODE_LOCK_FILENAME = "node.lock"; + /** + * The node lock. + * + * @opensearch.internal + */ public static class NodeLock implements Releasable { private final int nodeId; diff --git a/server/src/main/java/org/opensearch/gateway/Gateway.java b/server/src/main/java/org/opensearch/gateway/Gateway.java index 1891c5020015c..f46f4317c83e1 100644 --- a/server/src/main/java/org/opensearch/gateway/Gateway.java +++ b/server/src/main/java/org/opensearch/gateway/Gateway.java @@ -144,6 +144,11 @@ public void performStateRecovery(final GatewayStateRecoveredListener listener) t listener.onSuccess(recoveredState); } + /** + * The lister for state recovered. + * + * @opensearch.internal + */ public interface GatewayStateRecoveredListener { void onSuccess(ClusterState build); diff --git a/server/src/main/java/org/opensearch/gateway/LocalAllocateDangledIndices.java b/server/src/main/java/org/opensearch/gateway/LocalAllocateDangledIndices.java index c100bbb9a7406..fe0eacc244f32 100644 --- a/server/src/main/java/org/opensearch/gateway/LocalAllocateDangledIndices.java +++ b/server/src/main/java/org/opensearch/gateway/LocalAllocateDangledIndices.java @@ -266,6 +266,12 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS } } + /** + * The request. + * + * @opensearch.internal + */ + public static class AllocateDangledRequest extends TransportRequest { DiscoveryNode fromNode; @@ -290,6 +296,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * The response. + * + * @opensearch.internal + */ public static class AllocateDangledResponse extends TransportResponse { private boolean ack; diff --git a/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java b/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java index c3581265945b1..ea77e4ae5f13b 100644 --- a/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java +++ b/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java @@ -268,6 +268,11 @@ public Path[] getDataPaths() { return dataPaths; } + /** + * The on disk state. + * + * @opensearch.internal + */ public static class OnDiskState { private static final OnDiskState NO_ON_DISK_STATE = new OnDiskState(null, null, 0L, 0L, Metadata.EMPTY_METADATA); @@ -585,6 +590,11 @@ public void close() throws IOException { } } + /** + * Writer for cluster state service + * + * @opensearch.internal + */ public static class Writer implements Closeable { private final List metadataIndexWriters; diff --git a/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayMetaState.java b/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayMetaState.java index ce9af1a7dd748..be914c6a40a83 100644 --- a/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayMetaState.java +++ b/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayMetaState.java @@ -121,6 +121,11 @@ protected NodeGatewayMetaState nodeOperation(NodeRequest request) { return new NodeGatewayMetaState(clusterService.localNode(), metaState.getMetadata()); } + /** + * The request. + * + * @opensearch.internal + */ public static class Request extends BaseNodesRequest { public Request(StreamInput in) throws IOException { @@ -132,6 +137,11 @@ public Request(String... nodesIds) { } } + /** + * The nodes gateway metastate. + * + * @opensearch.internal + */ public static class NodesGatewayMetaState extends BaseNodesResponse { public NodesGatewayMetaState(StreamInput in) throws IOException { @@ -153,6 +163,11 @@ protected void writeNodesTo(StreamOutput out, List nodes) } } + /** + * The node request. + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { NodeRequest() {} @@ -161,6 +176,11 @@ public static class NodeRequest extends BaseNodeRequest { } } + /** + * The node gateway metastate. + * + * @opensearch.internal + */ public static class NodeGatewayMetaState extends BaseNodeResponse { private Metadata metadata; diff --git a/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayStartedShards.java b/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayStartedShards.java index 11a2c8370ae7b..78b4fa287ef59 100644 --- a/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayStartedShards.java +++ b/server/src/main/java/org/opensearch/gateway/TransportNodesListGatewayStartedShards.java @@ -211,6 +211,11 @@ protected NodeGatewayStartedShards nodeOperation(NodeRequest request) { } } + /** + * The nodes request. + * + * @opensearch.internal + */ public static class Request extends BaseNodesRequest { private final ShardId shardId; @@ -257,6 +262,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * The nodes response. + * + * @opensearch.internal + */ public static class NodesGatewayStartedShards extends BaseNodesResponse { public NodesGatewayStartedShards(StreamInput in) throws IOException { @@ -282,6 +292,11 @@ protected void writeNodesTo(StreamOutput out, List nod } } + /** + * The request. + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { private final ShardId shardId; @@ -328,6 +343,11 @@ public String getCustomDataPath() { } } + /** + * The response. + * + * @opensearch.internal + */ public static class NodeGatewayStartedShards extends BaseNodeResponse { private final String allocationId; diff --git a/server/src/main/java/org/opensearch/ingest/DropProcessor.java b/server/src/main/java/org/opensearch/ingest/DropProcessor.java index b3110755fa2d2..44aee29c7b4a6 100644 --- a/server/src/main/java/org/opensearch/ingest/DropProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/DropProcessor.java @@ -58,6 +58,11 @@ public String getType() { return TYPE; } + /** + * A factory for the processor. + * + * @opensearch.internal + */ public static final class Factory implements Processor.Factory { @Override diff --git a/server/src/main/java/org/opensearch/ingest/IngestDocument.java b/server/src/main/java/org/opensearch/ingest/IngestDocument.java index e1759342da7ef..ecc5758299e42 100644 --- a/server/src/main/java/org/opensearch/ingest/IngestDocument.java +++ b/server/src/main/java/org/opensearch/ingest/IngestDocument.java @@ -845,6 +845,11 @@ public String toString() { return "IngestDocument{" + " sourceAndMetadata=" + sourceAndMetadata + ", ingestMetadata=" + ingestMetadata + '}'; } + /** + * The ingest metadata. + * + * @opensearch.internal + */ public enum Metadata { INDEX(IndexFieldMapper.NAME), ID(IdFieldMapper.NAME), diff --git a/server/src/main/java/org/opensearch/ingest/IngestStats.java b/server/src/main/java/org/opensearch/ingest/IngestStats.java index 115ae66113462..1f31e7931786d 100644 --- a/server/src/main/java/org/opensearch/ingest/IngestStats.java +++ b/server/src/main/java/org/opensearch/ingest/IngestStats.java @@ -180,6 +180,11 @@ public int hashCode() { return Objects.hash(totalStats, pipelineStats, processorStats); } + /** + * The ingest statistics. + * + * @opensearch.internal + */ public static class Stats implements Writeable, ToXContentFragment { private final long ingestCount; diff --git a/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java b/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java index 62226ef7682cb..300b9824b277a 100644 --- a/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java @@ -91,6 +91,11 @@ TemplateScript.Factory getPipelineTemplate() { return pipelineTemplate; } + /** + * Factory for the processor. + * + * @opensearch.internal + */ public static final class Factory implements Processor.Factory { private final IngestService ingestService; diff --git a/server/src/main/java/org/opensearch/ingest/ValueSource.java b/server/src/main/java/org/opensearch/ingest/ValueSource.java index fefa535797e27..0ef7c3373596d 100644 --- a/server/src/main/java/org/opensearch/ingest/ValueSource.java +++ b/server/src/main/java/org/opensearch/ingest/ValueSource.java @@ -101,6 +101,11 @@ static ValueSource wrap(Object value, ScriptService scriptService) { } } + /** + * A map value source. + * + * @opensearch.internal + */ final class MapValue implements ValueSource { private final Map map; @@ -134,6 +139,11 @@ public int hashCode() { } } + /** + * A list value source. + * + * @opensearch.internal + */ final class ListValue implements ValueSource { private final List values; @@ -167,6 +177,11 @@ public int hashCode() { } } + /** + * An object value source. + * + * @opensearch.internal + */ final class ObjectValue implements ValueSource { private final Object value; @@ -195,6 +210,11 @@ public int hashCode() { } } + /** + * A byte value source. + * + * @opensearch.internal + */ final class ByteValue implements ValueSource { private final byte[] value; @@ -224,6 +244,11 @@ public int hashCode() { } + /** + * A templated value. + * + * @opensearch.internal + */ final class TemplatedValue implements ValueSource { private final TemplateScript.Factory template; diff --git a/server/src/main/java/org/opensearch/monitor/StatusInfo.java b/server/src/main/java/org/opensearch/monitor/StatusInfo.java index fdb8bc9469b6a..d6f8aa060385d 100644 --- a/server/src/main/java/org/opensearch/monitor/StatusInfo.java +++ b/server/src/main/java/org/opensearch/monitor/StatusInfo.java @@ -40,6 +40,11 @@ */ public class StatusInfo { + /** + * The status. + * + * @opensearch.internal + */ public enum Status { HEALTHY, UNHEALTHY diff --git a/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java b/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java index f28bdbfa916a2..f2a117cbc76a2 100644 --- a/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java +++ b/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java @@ -56,6 +56,11 @@ */ public class FsInfo implements Iterable, Writeable, ToXContentFragment { + /** + * Path for the file system + * + * @opensearch.internal + */ public static class Path implements Writeable, ToXContentObject { String path; @@ -183,6 +188,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * The device status. + * + * @opensearch.internal + */ public static class DeviceStats implements Writeable, ToXContentFragment { final int majorDeviceNumber; @@ -320,6 +330,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } + /** + * The I/O statistics. + * + * @opensearch.internal + */ public static class IoStats implements Writeable, ToXContentFragment { private static final String OPERATIONS = "operations"; diff --git a/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java b/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java index 6751c52a0a536..12d749a2b9102 100644 --- a/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java @@ -140,6 +140,11 @@ private Map createThreadInfoMap(long threadIds[]) { return unmodifiableMap(threadInfoMap); } + /** + * The deadlock being analyzed. + * + * @opensearch.internal + */ public static class Deadlock { private final ThreadInfo members[]; private final String description; diff --git a/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java index 31f597ebebcc8..819d67cb8621a 100644 --- a/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java @@ -599,6 +599,11 @@ static final class Fields { static final String INPUT_ARGUMENTS = "input_arguments"; } + /** + * Memory information. + * + * @opensearch.internal + */ public static class Mem implements Writeable { private final long heapInit; diff --git a/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java index 0924adb4e8114..172ab8aae4ccd 100644 --- a/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java @@ -371,6 +371,11 @@ static final class Fields { static final String TOTAL_UNLOADED_COUNT = "total_unloaded_count"; } + /** + * Garbage collector references. + * + * @opensearch.internal + */ public static class GarbageCollectors implements Writeable, Iterable { private final GarbageCollector[] collectors; @@ -398,6 +403,11 @@ public Iterator iterator() { } } + /** + * The garbage collector. + * + * @opensearch.internal + */ public static class GarbageCollector implements Writeable { private final String name; @@ -436,6 +446,11 @@ public TimeValue getCollectionTime() { } } + /** + * Thread information. + * + * @opensearch.internal + */ public static class Threads implements Writeable { private final int count; @@ -470,6 +485,8 @@ public int getPeakCount() { * Stores the memory usage after the Java virtual machine * most recently expended effort in recycling unused objects * in particular memory pool. + * + * @opensearch.internal */ public static class MemoryPoolGcStats implements Writeable { @@ -508,6 +525,11 @@ public short getUsagePercent() { } } + /** + * A memory pool. + * + * @opensearch.internal + */ public static class MemoryPool implements Writeable { private final String name; @@ -579,6 +601,11 @@ public MemoryPoolGcStats getLastGcStats() { } } + /** + * Memory data. + * + * @opensearch.internal + */ public static class Mem implements Writeable, Iterable { private final long heapCommitted; @@ -655,6 +682,11 @@ public ByteSizeValue getNonHeapUsed() { } } + /** + * A buffer pool. + * + * @opensearch.internal + */ public static class BufferPool implements Writeable { private final String name; @@ -701,6 +733,11 @@ public ByteSizeValue getUsed() { } } + /** + * Class information. + * + * @opensearch.internal + */ public static class Classes implements Writeable { private final long loadedClassCount; diff --git a/server/src/main/java/org/opensearch/monitor/os/OsStats.java b/server/src/main/java/org/opensearch/monitor/os/OsStats.java index e05fb56ba5570..9f3a83f677540 100644 --- a/server/src/main/java/org/opensearch/monitor/os/OsStats.java +++ b/server/src/main/java/org/opensearch/monitor/os/OsStats.java @@ -140,6 +140,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * CPU Information. + * + * @opensearch.internal + */ public static class Cpu implements Writeable, ToXContentFragment { private final short percent; @@ -200,6 +205,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Swap information. + * + * @opensearch.internal + */ public static class Swap implements Writeable, ToXContentFragment { private static final Logger logger = LogManager.getLogger(Swap.class); @@ -263,6 +273,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * OS Memory information. + * + * @opensearch.internal + */ public static class Mem implements Writeable, ToXContentFragment { private static final Logger logger = LogManager.getLogger(Mem.class); @@ -337,6 +352,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws /** * Encapsulates basic cgroup statistics. + * + * @opensearch.internal */ public static class Cgroup implements Writeable, ToXContentFragment { @@ -528,6 +545,8 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa /** * Encapsulates CPU time statistics. + * + * @opensearch.internal */ public static class CpuStat implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java b/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java index e5ed6a4a7d369..874b32a74c912 100644 --- a/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java +++ b/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java @@ -138,6 +138,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Process memory information. + * + * @opensearch.internal + */ public static class Mem implements Writeable { private final long totalVirtual; @@ -160,6 +165,11 @@ public ByteSizeValue getTotalVirtual() { } } + /** + * Process CPU information. + * + * @opensearch.internal + */ public static class Cpu implements Writeable { private final short percent; diff --git a/server/src/main/java/org/opensearch/node/Node.java b/server/src/main/java/org/opensearch/node/Node.java index c09bdc11693c4..7e205b88e9eb1 100644 --- a/server/src/main/java/org/opensearch/node/Node.java +++ b/server/src/main/java/org/opensearch/node/Node.java @@ -297,6 +297,11 @@ public class Node implements Closeable { private static final String CLIENT_TYPE = "node"; + /** + * The discovery settings for the node. + * + * @opensearch.internal + */ public static class DiscoverySettings { public static final Setting INITIAL_STATE_TIMEOUT_SETTING = Setting.positiveTimeSetting( "discovery.initial_state_timeout", diff --git a/server/src/main/java/org/opensearch/node/ReportingService.java b/server/src/main/java/org/opensearch/node/ReportingService.java index 97d4b2a1bafaa..eca52d5f0f3fc 100644 --- a/server/src/main/java/org/opensearch/node/ReportingService.java +++ b/server/src/main/java/org/opensearch/node/ReportingService.java @@ -43,6 +43,11 @@ public interface ReportingService { I info(); + /** + * Information interface. + * + * @opensearch.internal + */ interface Info extends Writeable, ToXContent { } diff --git a/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java b/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java index caede050df5a7..e5af66dd5054f 100644 --- a/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java +++ b/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java @@ -206,6 +206,11 @@ public void onFailure(Exception e) { } } + /** + * The state of the task. + * + * @opensearch.internal + */ public enum State { STARTED, // the task is currently running PENDING_CANCEL, // the task is cancelled on master, cancelling it locally diff --git a/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java index 6ae3150a04019..69f6c7ca6c233 100644 --- a/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java @@ -70,6 +70,11 @@ private CompletionPersistentTaskAction() { super(NAME, PersistentTaskResponse::new); } + /** + * The request. + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String taskId; @@ -129,6 +134,11 @@ public int hashCode() { } } + /** + * The request bulder. + * + * @opensearch.internal + */ public static class RequestBuilder extends MasterNodeOperationRequestBuilder< CompletionPersistentTaskAction.Request, PersistentTaskResponse, @@ -139,6 +149,11 @@ protected RequestBuilder(OpenSearchClient client, CompletionPersistentTaskAction } } + /** + * The transport action. + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final PersistentTasksClusterService persistentTasksClusterService; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java index ac6536564d8d0..19d75355c8d04 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java @@ -276,6 +276,12 @@ public static ClusterState disassociateDeadNodes(ClusterState clusterState) { return ClusterState.builder(clusterState).metadata(metadataBuilder).build(); } + /** + * The assignment. + * + * @opensearch.internal + */ + public static class Assignment { @Nullable private final String executorNode; @@ -598,6 +604,11 @@ public static Builder builder(PersistentTasksCustomMetadata tasks) { return new Builder(tasks); } + /** + * The task builder. + * + * @opensearch.internal + */ public static class Builder { private final Map> tasks = new HashMap<>(); private long lastAllocationId; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java index 54ffadb96243a..34fe90ef58d36 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java @@ -324,6 +324,11 @@ public void onFailure(Exception e) { } } + /** + * The executor status. + * + * @opensearch.internal + */ public static class Status implements Task.Status { public static final String NAME = "persistent_executor"; diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java index 1026be4ad8161..224943ce8ce38 100644 --- a/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java @@ -245,6 +245,11 @@ public void onTimeout(TimeValue timeout) { } } + /** + * Interface for a class that waits and listens for a persistent task. + * + * @opensearch.internal + */ public interface WaitForPersistentTaskListener

extends ActionListener> { default void onTimeout(TimeValue timeout) { onFailure(new IllegalStateException("Timed out when waiting for persistent task after " + timeout)); diff --git a/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java index 855e5b0099b29..4f706ac1c48fb 100644 --- a/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java @@ -67,6 +67,11 @@ private RemovePersistentTaskAction() { super(NAME, PersistentTaskResponse::new); } + /** + * The request. + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String taskId; @@ -111,6 +116,11 @@ public int hashCode() { } } + /** + * The request builder. + * + * @opensearch.internal + */ public static class RequestBuilder extends MasterNodeOperationRequestBuilder< RemovePersistentTaskAction.Request, PersistentTaskResponse, @@ -127,6 +137,11 @@ public final RequestBuilder setTaskId(String taskId) { } + /** + * The transport action. + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final PersistentTasksClusterService persistentTasksClusterService; diff --git a/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java index 2bd822d2fab62..122313e6a8ebf 100644 --- a/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java @@ -70,6 +70,11 @@ private StartPersistentTaskAction() { super(NAME, PersistentTaskResponse::new); } + /** + * Request for the action. + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String taskId; @@ -163,6 +168,11 @@ public void setParams(PersistentTaskParams params) { } + /** + * The request builder. + * + * @opensearch.internal + */ public static class RequestBuilder extends MasterNodeOperationRequestBuilder< StartPersistentTaskAction.Request, PersistentTaskResponse, @@ -189,6 +199,11 @@ public RequestBuilder setRequest(PersistentTaskParams params) { } + /** + * The transport action. + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final PersistentTasksClusterService persistentTasksClusterService; diff --git a/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java b/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java index 928e51f5a594c..5cbbcee937247 100644 --- a/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java +++ b/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java @@ -69,6 +69,11 @@ private UpdatePersistentTaskStatusAction() { super(NAME, PersistentTaskResponse::new); } + /** + * The action request. + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String taskId; @@ -138,6 +143,11 @@ public int hashCode() { } } + /** + * The request builder. + * + * @opensearch.internal + */ public static class RequestBuilder extends MasterNodeOperationRequestBuilder< UpdatePersistentTaskStatusAction.Request, PersistentTaskResponse, @@ -158,6 +168,12 @@ public final RequestBuilder setState(PersistentTaskState state) { } } + /** + * The transport action. + * + * @opensearch.internal + */ + public static class TransportAction extends TransportMasterNodeAction { private final PersistentTasksClusterService persistentTasksClusterService; diff --git a/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java b/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java index 70a03b7710b6f..7b5840324b921 100644 --- a/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java +++ b/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java @@ -67,6 +67,11 @@ public String toString() { return "assignment decision [type=" + type + ", reason=" + reason + "]"; } + /** + * The decision. + * + * @opensearch.internal + */ public enum Type { NO(0), YES(1); diff --git a/server/src/main/java/org/opensearch/repositories/ShardGenerations.java b/server/src/main/java/org/opensearch/repositories/ShardGenerations.java index 5857ec537d1dc..27eac4dfdd8c1 100644 --- a/server/src/main/java/org/opensearch/repositories/ShardGenerations.java +++ b/server/src/main/java/org/opensearch/repositories/ShardGenerations.java @@ -195,6 +195,11 @@ public static Builder builder() { return new Builder(); } + /** + * Builder for the shard generations. + * + * @opensearch.internal + */ public static final class Builder { private final Map> generations = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/repositories/VerifyNodeRepositoryAction.java b/server/src/main/java/org/opensearch/repositories/VerifyNodeRepositoryAction.java index 6b8c44ed6d54c..98e8521ecff57 100644 --- a/server/src/main/java/org/opensearch/repositories/VerifyNodeRepositoryAction.java +++ b/server/src/main/java/org/opensearch/repositories/VerifyNodeRepositoryAction.java @@ -161,6 +161,11 @@ private void doVerify(String repositoryName, String verificationToken, Discovery repository.verify(verificationToken, localNode); } + /** + * Request to verify a node repository. + * + * @opensearch.internal + */ public static class VerifyNodeRepositoryRequest extends TransportRequest { private String repository; diff --git a/server/src/main/java/org/opensearch/rest/BaseRestHandler.java b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java index 4519f2a3622b1..4b4c020b43e74 100644 --- a/server/src/main/java/org/opensearch/rest/BaseRestHandler.java +++ b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java @@ -233,6 +233,11 @@ public static void parseDeprecatedMasterTimeoutParameter( } } + /** + * A wrapper for the base handler. + * + * @opensearch.internal + */ public static class Wrapper extends BaseRestHandler { protected final BaseRestHandler delegate; diff --git a/server/src/main/java/org/opensearch/rest/RestHandler.java b/server/src/main/java/org/opensearch/rest/RestHandler.java index 14f54d371632d..1350522c99a01 100644 --- a/server/src/main/java/org/opensearch/rest/RestHandler.java +++ b/server/src/main/java/org/opensearch/rest/RestHandler.java @@ -119,6 +119,11 @@ static RestHandler wrapper(RestHandler delegate) { return new Wrapper(delegate); } + /** + * Wrapper for a handler. + * + * @opensearch.internal + */ class Wrapper implements RestHandler { private final RestHandler delegate; @@ -172,6 +177,11 @@ public boolean allowSystemIndexAccessByDefault() { } } + /** + * Route for the request. + * + * @opensearch.internal + */ class Route { private final String path; diff --git a/server/src/main/java/org/opensearch/rest/RestRequest.java b/server/src/main/java/org/opensearch/rest/RestRequest.java index 65ba5b61eeddd..d44a4e3039543 100644 --- a/server/src/main/java/org/opensearch/rest/RestRequest.java +++ b/server/src/main/java/org/opensearch/rest/RestRequest.java @@ -228,6 +228,11 @@ public static RestRequest requestWithoutParameters( ); } + /** + * The method used. + * + * @opensearch.internal + */ public enum Method { GET, POST, @@ -583,6 +588,11 @@ public static XContentType parseContentType(List header) { throw new IllegalArgumentException("empty Content-Type header"); } + /** + * Thrown if there is an error in the content type header. + * + * @opensearch.internal + */ public static class ContentTypeHeaderException extends RuntimeException { ContentTypeHeaderException(final IllegalArgumentException cause) { @@ -591,6 +601,11 @@ public static class ContentTypeHeaderException extends RuntimeException { } + /** + * Thrown if there is a bad parameter. + * + * @opensearch.internal + */ public static class BadParameterException extends RuntimeException { BadParameterException(final IllegalArgumentException cause) { diff --git a/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java index f61cf8ddbbd59..b9c165a033c64 100644 --- a/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java +++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestAnalyzeAction.java @@ -54,6 +54,11 @@ */ public class RestAnalyzeAction extends BaseRestHandler { + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ public static class Fields { public static final ParseField ANALYZER = new ParseField("analyzer"); public static final ParseField TEXT = new ParseField("text"); diff --git a/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java index 50bd8c9d1aab4..e2348aa04f07a 100644 --- a/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java +++ b/server/src/main/java/org/opensearch/rest/action/admin/indices/RestResizeHandler.java @@ -102,6 +102,11 @@ public final RestChannelConsumer prepareRequest(final RestRequest request, final return channel -> client.admin().indices().resizeIndex(resizeRequest, new RestToXContentListener<>(channel)); } + /** + * Shrink index action. + * + * @opensearch.internal + */ public static class RestShrinkIndexAction extends RestResizeHandler { @Override @@ -121,6 +126,11 @@ protected ResizeType getResizeType() { } + /** + * Split index action. + * + * @opensearch.internal + */ public static class RestSplitIndexAction extends RestResizeHandler { @Override @@ -140,6 +150,11 @@ protected ResizeType getResizeType() { } + /** + * Clone index action. + * + * @opensearch.internal + */ public static class RestCloneIndexAction extends RestResizeHandler { @Override diff --git a/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java index ba3558f6fe80c..e7b1da91aba8f 100644 --- a/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java +++ b/server/src/main/java/org/opensearch/rest/action/document/RestIndexAction.java @@ -71,6 +71,11 @@ public String getName() { return "document_index_action"; } + /** + * Create handler action. + * + * @opensearch.internal + */ public static final class CreateHandler extends RestIndexAction { @Override @@ -97,6 +102,11 @@ void validateOpType(String opType) { } } + /** + * The auto id handler. + * + * @opensearch.internal + */ public static final class AutoIdHandler extends RestIndexAction { private final Supplier nodesInCluster; diff --git a/server/src/main/java/org/opensearch/script/AggregationScript.java b/server/src/main/java/org/opensearch/script/AggregationScript.java index 84dd308a9088d..4c9d6060ddbfd 100644 --- a/server/src/main/java/org/opensearch/script/AggregationScript.java +++ b/server/src/main/java/org/opensearch/script/AggregationScript.java @@ -167,6 +167,8 @@ public double runAsDouble() { /** * A factory to construct {@link AggregationScript} instances. + * + * @opensearch.internal */ public interface LeafFactory { AggregationScript newInstance(LeafReaderContext ctx) throws IOException; @@ -179,6 +181,8 @@ public interface LeafFactory { /** * A factory to construct stateful {@link AggregationScript} factories for a specific index. + * + * @opensearch.internal */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); diff --git a/server/src/main/java/org/opensearch/script/BucketAggregationScript.java b/server/src/main/java/org/opensearch/script/BucketAggregationScript.java index ee54e83adcdea..55614e7fd7b9e 100644 --- a/server/src/main/java/org/opensearch/script/BucketAggregationScript.java +++ b/server/src/main/java/org/opensearch/script/BucketAggregationScript.java @@ -63,6 +63,11 @@ public Map getParams() { public abstract Number execute(); + /** + * Factory for bucket agg script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { BucketAggregationScript newInstance(Map params); } diff --git a/server/src/main/java/org/opensearch/script/BucketAggregationSelectorScript.java b/server/src/main/java/org/opensearch/script/BucketAggregationSelectorScript.java index 6accb3043b8db..bc4ffbd57ebaa 100644 --- a/server/src/main/java/org/opensearch/script/BucketAggregationSelectorScript.java +++ b/server/src/main/java/org/opensearch/script/BucketAggregationSelectorScript.java @@ -63,6 +63,11 @@ public Map getParams() { public abstract boolean execute(); + /** + * Factory for bucket agg selector script + * + * @opensearch.internal + */ public interface Factory { BucketAggregationSelectorScript newInstance(Map params); } diff --git a/server/src/main/java/org/opensearch/script/FieldScript.java b/server/src/main/java/org/opensearch/script/FieldScript.java index 40d3e8a70f923..531616a74dce9 100644 --- a/server/src/main/java/org/opensearch/script/FieldScript.java +++ b/server/src/main/java/org/opensearch/script/FieldScript.java @@ -110,11 +110,20 @@ public void setDocument(int docid) { leafLookup.setDocument(docid); } - /** A factory to construct {@link FieldScript} instances. */ + /** + * A factory to construct {@link FieldScript} instances. + * + * @opensearch.internal + */ public interface LeafFactory { FieldScript newInstance(LeafReaderContext ctx) throws IOException; } + /** + * Factory for field script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); } diff --git a/server/src/main/java/org/opensearch/script/FilterScript.java b/server/src/main/java/org/opensearch/script/FilterScript.java index ca3bc79de0929..caba1c1e7d34a 100644 --- a/server/src/main/java/org/opensearch/script/FilterScript.java +++ b/server/src/main/java/org/opensearch/script/FilterScript.java @@ -79,12 +79,20 @@ public void setDocument(int docid) { leafLookup.setDocument(docid); } - /** A factory to construct {@link FilterScript} instances. */ + /** + * A factory to construct {@link FilterScript} instances. + * + * @opensearch.internal + */ public interface LeafFactory { FilterScript newInstance(LeafReaderContext ctx) throws IOException; } - /** A factory to construct stateful {@link FilterScript} factories for a specific index. */ + /** + * A factory to construct stateful {@link FilterScript} factories for a specific index. + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); } diff --git a/server/src/main/java/org/opensearch/script/IngestConditionalScript.java b/server/src/main/java/org/opensearch/script/IngestConditionalScript.java index 378ac6e39394f..2136a55cb69e8 100644 --- a/server/src/main/java/org/opensearch/script/IngestConditionalScript.java +++ b/server/src/main/java/org/opensearch/script/IngestConditionalScript.java @@ -68,6 +68,11 @@ public Map getParams() { public abstract boolean execute(Map ctx); + /** + * Factory for ingest condition script + * + * @opensearch.internal + */ public interface Factory { IngestConditionalScript newInstance(Map params); } diff --git a/server/src/main/java/org/opensearch/script/IngestScript.java b/server/src/main/java/org/opensearch/script/IngestScript.java index 96802df1096e4..b427e09308573 100644 --- a/server/src/main/java/org/opensearch/script/IngestScript.java +++ b/server/src/main/java/org/opensearch/script/IngestScript.java @@ -68,6 +68,11 @@ public Map getParams() { public abstract void execute(Map ctx); + /** + * Factory for ingest script + * + * @opensearch.internal + */ public interface Factory { IngestScript newInstance(Map params); } diff --git a/server/src/main/java/org/opensearch/script/NumberSortScript.java b/server/src/main/java/org/opensearch/script/NumberSortScript.java index 097e5045aa803..fc4cfdb83f7cb 100644 --- a/server/src/main/java/org/opensearch/script/NumberSortScript.java +++ b/server/src/main/java/org/opensearch/script/NumberSortScript.java @@ -59,6 +59,8 @@ protected NumberSortScript() { /** * A factory to construct {@link NumberSortScript} instances. + * + * @opensearch.internal */ public interface LeafFactory { NumberSortScript newInstance(LeafReaderContext ctx) throws IOException; @@ -71,6 +73,8 @@ public interface LeafFactory { /** * A factory to construct stateful {@link NumberSortScript} factories for a specific index. + * + * @opensearch.internal */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); diff --git a/server/src/main/java/org/opensearch/script/ScoreScript.java b/server/src/main/java/org/opensearch/script/ScoreScript.java index 887032aa97811..dba44995b18f0 100644 --- a/server/src/main/java/org/opensearch/script/ScoreScript.java +++ b/server/src/main/java/org/opensearch/script/ScoreScript.java @@ -55,7 +55,11 @@ */ public abstract class ScoreScript { - /** A helper to take in an explanation from a script and turn it into an {@link org.apache.lucene.search.Explanation} */ + /** + * A helper to take in an explanation from a script and turn it into an {@link org.apache.lucene.search.Explanation} + * + * @opensearch.internal + */ public static class ExplanationHolder { private String description; @@ -242,7 +246,11 @@ public void _setIndexVersion(Version indexVersion) { this.indexVersion = indexVersion; } - /** A factory to construct {@link ScoreScript} instances. */ + /** + * A factory to construct {@link ScoreScript} instances. + * + * @opensearch.internal + */ public interface LeafFactory { /** @@ -253,7 +261,11 @@ public interface LeafFactory { ScoreScript newInstance(LeafReaderContext ctx) throws IOException; } - /** A factory to construct stateful {@link ScoreScript} factories for a specific index. */ + /** + * A factory to construct stateful {@link ScoreScript} factories for a specific index. + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { ScoreScript.LeafFactory newFactory(Map params, SearchLookup lookup); diff --git a/server/src/main/java/org/opensearch/script/ScoreScriptUtils.java b/server/src/main/java/org/opensearch/script/ScoreScriptUtils.java index 1b1f7d7ba427b..f955413907714 100644 --- a/server/src/main/java/org/opensearch/script/ScoreScriptUtils.java +++ b/server/src/main/java/org/opensearch/script/ScoreScriptUtils.java @@ -69,7 +69,11 @@ public static double sigmoid(double value, double k, double a) { return Math.pow(value, a) / (Math.pow(k, a) + Math.pow(value, a)); } - // random score based on the documents' values of the given field + /** + * random score based on the documents' values of the given field + * + * @opensearch.internal + */ public static final class RandomScoreField { private final ScoreScript scoreScript; private final ScriptDocValues docValues; @@ -95,7 +99,11 @@ public double randomScore() { } } - // random score based on the internal Lucene document Ids + /** + * random score based on the internal Lucene document Ids + * + * @opensearch.internal + */ public static final class RandomScoreDoc { private final ScoreScript scoreScript; private final int saltedSeed; @@ -113,7 +121,11 @@ public double randomScore() { } } - // **** Decay functions on geo field + /** + * **** Decay functions on geo field + * + * @opensearch.internal + */ public static final class DecayGeoLinear { // cached variables calculated once per script execution double originLat; @@ -137,6 +149,11 @@ public double decayGeoLinear(GeoPoint docValue) { } } + /** + * Exponential geo decay + * + * @opensearch.internal + */ public static final class DecayGeoExp { double originLat; double originLon; @@ -159,6 +176,11 @@ public double decayGeoExp(GeoPoint docValue) { } } + /** + * Gaussian geo decay + * + * @opensearch.internal + */ public static final class DecayGeoGauss { double originLat; double originLon; @@ -183,6 +205,11 @@ public double decayGeoGauss(GeoPoint docValue) { // **** Decay functions on numeric field + /** + * Linear numeric decay + * + * @opensearch.internal + */ public static final class DecayNumericLinear { double origin; double offset; @@ -200,6 +227,11 @@ public double decayNumericLinear(double docValue) { } } + /** + * Exponential numeric decay + * + * @opensearch.internal + */ public static final class DecayNumericExp { double origin; double offset; @@ -217,6 +249,11 @@ public double decayNumericExp(double docValue) { } } + /** + * Gaussian numeric decay + * + * @opensearch.internal + */ public static final class DecayNumericGauss { double origin; double offset; @@ -245,6 +282,11 @@ public double decayNumericGauss(double docValue) { private static final ZoneId defaultZoneId = ZoneId.of("UTC"); private static final DateMathParser dateParser = DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER.toDateMathParser(); + /** + * Linear date decay + * + * @opensearch.internal + */ public static final class DecayDateLinear { long origin; long offset; @@ -268,6 +310,11 @@ public double decayDateLinear(JodaCompatibleZonedDateTime docValueDate) { } } + /** + * Exponential date decay + * + * @opensearch.internal + */ public static final class DecayDateExp { long origin; long offset; @@ -290,6 +337,11 @@ public double decayDateExp(JodaCompatibleZonedDateTime docValueDate) { } } + /** + * Gaussian date decay + * + * @opensearch.internal + */ public static final class DecayDateGauss { long origin; long offset; diff --git a/server/src/main/java/org/opensearch/script/ScriptCache.java b/server/src/main/java/org/opensearch/script/ScriptCache.java index 1b898b90ba144..874888b53b978 100644 --- a/server/src/main/java/org/opensearch/script/ScriptCache.java +++ b/server/src/main/java/org/opensearch/script/ScriptCache.java @@ -264,6 +264,11 @@ private TokenBucketState(long lastInlineCompileTime, double availableTokens, boo } } + /** + * Tracking compilation rate + * + * @opensearch.internal + */ public static class CompilationRate { public final int count; public final TimeValue time; diff --git a/server/src/main/java/org/opensearch/script/ScriptContextInfo.java b/server/src/main/java/org/opensearch/script/ScriptContextInfo.java index 68297eb12216a..124cbf5406d2a 100644 --- a/server/src/main/java/org/opensearch/script/ScriptContextInfo.java +++ b/server/src/main/java/org/opensearch/script/ScriptContextInfo.java @@ -199,6 +199,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder.endArray().endObject(); } + /** + * Script method information + * + * @opensearch.internal + */ public static class ScriptMethodInfo implements ToXContentObject, Writeable { public final String name, returnType; public final List parameters; @@ -277,6 +282,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder.endArray().endObject(); } + /** + * Parameter information + * + * @opensearch.internal + */ public static class ParameterInfo implements ToXContentObject, Writeable { public final String type, name; diff --git a/server/src/main/java/org/opensearch/script/ScriptException.java b/server/src/main/java/org/opensearch/script/ScriptException.java index 8255751189002..619b9a4239512 100644 --- a/server/src/main/java/org/opensearch/script/ScriptException.java +++ b/server/src/main/java/org/opensearch/script/ScriptException.java @@ -188,6 +188,11 @@ public RestStatus status() { return RestStatus.BAD_REQUEST; } + /** + * Position data + * + * @opensearch.internal + */ public static class Position { public final int offset; public final int start; diff --git a/server/src/main/java/org/opensearch/script/ScriptMetadata.java b/server/src/main/java/org/opensearch/script/ScriptMetadata.java index ed57d978bf2ff..eef3ed84d2cc2 100644 --- a/server/src/main/java/org/opensearch/script/ScriptMetadata.java +++ b/server/src/main/java/org/opensearch/script/ScriptMetadata.java @@ -72,6 +72,8 @@ public final class ScriptMetadata implements Metadata.Custom, Writeable, ToXCont * the {@link ClusterState}. Scripts can be added or deleted, then built * to generate a new {@link Map} of scripts that will be used to update * the current {@link ClusterState}. + * + * @opensearch.internal */ public static final class Builder { diff --git a/server/src/main/java/org/opensearch/script/ScriptedMetricAggContexts.java b/server/src/main/java/org/opensearch/script/ScriptedMetricAggContexts.java index 43c6bb0a89890..58d0f7b4f6040 100644 --- a/server/src/main/java/org/opensearch/script/ScriptedMetricAggContexts.java +++ b/server/src/main/java/org/opensearch/script/ScriptedMetricAggContexts.java @@ -54,6 +54,11 @@ */ public class ScriptedMetricAggContexts { + /** + * Base initialization script + * + * @opensearch.internal + */ public abstract static class InitScript { private final Map params; private final Map state; @@ -73,6 +78,11 @@ public Object getState() { public abstract void execute(); + /** + * Factory for a scripted metric agg context + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { InitScript newInstance(Map params, Map state); } @@ -81,6 +91,11 @@ public interface Factory extends ScriptFactory { public static ScriptContext CONTEXT = new ScriptContext<>("aggs_init", Factory.class); } + /** + * Base map script + * + * @opensearch.internal + */ public abstract static class MapScript { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DynamicMap.class); @@ -162,10 +177,20 @@ public double get_score() { public abstract void execute(); + /** + * Factory for a scripted metric agg context + * + * @opensearch.internal + */ public interface LeafFactory { MapScript newInstance(LeafReaderContext ctx); } + /** + * Factory for a scripted metric agg factory + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, Map state, SearchLookup lookup); } @@ -174,6 +199,11 @@ public interface Factory extends ScriptFactory { public static ScriptContext CONTEXT = new ScriptContext<>("aggs_map", Factory.class); } + /** + * Base combination script + * + * @opensearch.internal + */ public abstract static class CombineScript { private final Map params; private final Map state; @@ -193,6 +223,11 @@ public Map getState() { public abstract Object execute(); + /** + * Factory for a scripted metric agg context + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { CombineScript newInstance(Map params, Map state); } @@ -201,6 +236,11 @@ public interface Factory extends ScriptFactory { public static ScriptContext CONTEXT = new ScriptContext<>("aggs_combine", Factory.class); } + /** + * Base reduce script + * + * @opensearch.internal + */ public abstract static class ReduceScript { private final Map params; private final List states; @@ -220,6 +260,11 @@ public List getStates() { public abstract Object execute(); + /** + * Factory for a scripted metric agg context + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { ReduceScript newInstance(Map params, List states); } diff --git a/server/src/main/java/org/opensearch/script/SignificantTermsHeuristicScoreScript.java b/server/src/main/java/org/opensearch/script/SignificantTermsHeuristicScoreScript.java index 9d61407570546..3165dbc0641bb 100644 --- a/server/src/main/java/org/opensearch/script/SignificantTermsHeuristicScoreScript.java +++ b/server/src/main/java/org/opensearch/script/SignificantTermsHeuristicScoreScript.java @@ -47,6 +47,11 @@ public abstract class SignificantTermsHeuristicScoreScript { public abstract double execute(Map params); + /** + * Factory for a significant terms heuristic score script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { SignificantTermsHeuristicScoreScript newInstance(); } diff --git a/server/src/main/java/org/opensearch/script/SimilarityScript.java b/server/src/main/java/org/opensearch/script/SimilarityScript.java index dbee5af77e309..9b0987598b0de 100644 --- a/server/src/main/java/org/opensearch/script/SimilarityScript.java +++ b/server/src/main/java/org/opensearch/script/SimilarityScript.java @@ -56,6 +56,11 @@ public abstract double execute( ScriptedSimilarity.Doc doc ); + /** + * Factory for a similarity script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { SimilarityScript newInstance(); } diff --git a/server/src/main/java/org/opensearch/script/SimilarityWeightScript.java b/server/src/main/java/org/opensearch/script/SimilarityWeightScript.java index f780f87741680..cb355728ae894 100644 --- a/server/src/main/java/org/opensearch/script/SimilarityWeightScript.java +++ b/server/src/main/java/org/opensearch/script/SimilarityWeightScript.java @@ -48,6 +48,11 @@ public abstract class SimilarityWeightScript { */ public abstract double execute(ScriptedSimilarity.Query query, ScriptedSimilarity.Field field, ScriptedSimilarity.Term term); + /** + * Factory for a similarity weight script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { SimilarityWeightScript newInstance(); } diff --git a/server/src/main/java/org/opensearch/script/StringSortScript.java b/server/src/main/java/org/opensearch/script/StringSortScript.java index eee60d9dc4ef9..5b7ac1fc853e5 100644 --- a/server/src/main/java/org/opensearch/script/StringSortScript.java +++ b/server/src/main/java/org/opensearch/script/StringSortScript.java @@ -55,6 +55,8 @@ public StringSortScript(Map params, SearchLookup lookup, LeafRea /** * A factory to construct {@link StringSortScript} instances. + * + * @opensearch.internal */ public interface LeafFactory { StringSortScript newInstance(LeafReaderContext ctx) throws IOException; @@ -62,6 +64,8 @@ public interface LeafFactory { /** * A factory to construct stateful {@link StringSortScript} factories for a specific index. + * + * @opensearch.internal */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); diff --git a/server/src/main/java/org/opensearch/script/TemplateScript.java b/server/src/main/java/org/opensearch/script/TemplateScript.java index 0b03a4fd931c1..769999baba98d 100644 --- a/server/src/main/java/org/opensearch/script/TemplateScript.java +++ b/server/src/main/java/org/opensearch/script/TemplateScript.java @@ -57,6 +57,11 @@ public Map getParams() { /** Run a template and return the resulting string, encoded in utf8 bytes. */ public abstract String execute(); + /** + * Factory for a template script + * + * @opensearch.internal + */ public interface Factory { TemplateScript newInstance(Map params); } diff --git a/server/src/main/java/org/opensearch/script/TermsSetQueryScript.java b/server/src/main/java/org/opensearch/script/TermsSetQueryScript.java index d4a4d1cccbd5b..02e361b0f5415 100644 --- a/server/src/main/java/org/opensearch/script/TermsSetQueryScript.java +++ b/server/src/main/java/org/opensearch/script/TermsSetQueryScript.java @@ -125,6 +125,8 @@ public long runAsLong() { /** * A factory to construct {@link TermsSetQueryScript} instances. + * + * @opensearch.internal */ public interface LeafFactory { TermsSetQueryScript newInstance(LeafReaderContext ctx) throws IOException; @@ -132,6 +134,8 @@ public interface LeafFactory { /** * A factory to construct stateful {@link TermsSetQueryScript} factories for a specific index. + * + * @opensearch.internal */ public interface Factory extends ScriptFactory { LeafFactory newFactory(Map params, SearchLookup lookup); diff --git a/server/src/main/java/org/opensearch/script/UpdateScript.java b/server/src/main/java/org/opensearch/script/UpdateScript.java index 41f21f337877b..fdceadc03879e 100644 --- a/server/src/main/java/org/opensearch/script/UpdateScript.java +++ b/server/src/main/java/org/opensearch/script/UpdateScript.java @@ -78,6 +78,11 @@ public Map getCtx() { public abstract void execute(); + /** + * Factory for an update script + * + * @opensearch.internal + */ public interface Factory { UpdateScript newInstance(Map params, Map ctx); } diff --git a/server/src/main/java/org/opensearch/snapshots/RestoreService.java b/server/src/main/java/org/opensearch/snapshots/RestoreService.java index 3bdda9413cfd9..cc4b8e556a3c7 100644 --- a/server/src/main/java/org/opensearch/snapshots/RestoreService.java +++ b/server/src/main/java/org/opensearch/snapshots/RestoreService.java @@ -776,6 +776,11 @@ public static RestoreInProgress updateRestoreStateWithDeletedIndices(RestoreInPr } } + /** + * Response once restore is completed. + * + * @opensearch.internal + */ public static final class RestoreCompletionResponse { private final String uuid; private final Snapshot snapshot; diff --git a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java index a6cb566cba678..fb62c1243db7d 100644 --- a/server/src/main/java/org/opensearch/threadpool/ThreadPool.java +++ b/server/src/main/java/org/opensearch/threadpool/ThreadPool.java @@ -81,6 +81,11 @@ public class ThreadPool implements ReportingService, Scheduler { private static final Logger logger = LogManager.getLogger(ThreadPool.class); + /** + * The threadpool names. + * + * @opensearch.internal + */ public static class Names { public static final String SAME = "same"; public static final String GENERIC = "generic"; @@ -103,6 +108,11 @@ public static class Names { public static final String SYSTEM_WRITE = "system_write"; } + /** + * The threadpool type. + * + * @opensearch.internal + */ public enum ThreadPoolType { DIRECT("direct"), FIXED("fixed"), @@ -657,6 +667,11 @@ ExecutorService executor() { } } + /** + * The thread pool information. + * + * @opensearch.internal + */ public static class Info implements Writeable, ToXContentFragment { private final String name; diff --git a/server/src/main/java/org/opensearch/threadpool/ThreadPoolStats.java b/server/src/main/java/org/opensearch/threadpool/ThreadPoolStats.java index cf9e85ac30a92..9ebe16bf8e7ec 100644 --- a/server/src/main/java/org/opensearch/threadpool/ThreadPoolStats.java +++ b/server/src/main/java/org/opensearch/threadpool/ThreadPoolStats.java @@ -51,6 +51,11 @@ */ public class ThreadPoolStats implements Writeable, ToXContentFragment, Iterable { + /** + * The statistics. + * + * @opensearch.internal + */ public static class Stats implements Writeable, ToXContentFragment, Comparable { private final String name; diff --git a/server/src/main/java/org/opensearch/watcher/ResourceWatcherService.java b/server/src/main/java/org/opensearch/watcher/ResourceWatcherService.java index b8c819e187efd..5ac1b735f72ae 100644 --- a/server/src/main/java/org/opensearch/watcher/ResourceWatcherService.java +++ b/server/src/main/java/org/opensearch/watcher/ResourceWatcherService.java @@ -59,6 +59,11 @@ public class ResourceWatcherService implements Closeable { private static final Logger logger = LogManager.getLogger(ResourceWatcherService.class); + /** + * Frequency level to watch. + * + * @opensearch.internal + */ public enum Frequency { /**