From 2218082e28c531b84981068a52c5c22965766d53 Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Wed, 11 May 2022 15:58:10 -0500 Subject: [PATCH] [Javadocs] add to o.o.common (#3289) Add javadocs to top level and internal classes in the org.opensearch.common package. Signed-off-by: Nicholas Walter Knize (cherry picked from commit ad7ce4cd446523d52286530ccfbb1dabc2dc7f86) --- .../opensearch/common/AsyncBiFunction.java | 2 + .../opensearch/common/CheckedBiConsumer.java | 2 + .../opensearch/common/CheckedBiFunction.java | 2 + .../opensearch/common/CheckedSupplier.java | 2 + .../java/org/opensearch/common/Classes.java | 5 ++ .../java/org/opensearch/common/Explicit.java | 1 + .../ExponentiallyWeightedMovingAverage.java | 2 + .../opensearch/common/FieldMemoryStats.java | 2 + .../common/LegacyTimeBasedUUIDGenerator.java | 2 + .../opensearch/common/LocalTimeOffset.java | 38 ++++++++++++++ .../opensearch/common/MacAddressProvider.java | 5 ++ .../org/opensearch/common/NamedRegistry.java | 2 + .../java/org/opensearch/common/Numbers.java | 2 + .../opensearch/common/ParsingException.java | 2 + .../java/org/opensearch/common/PidFile.java | 2 + .../java/org/opensearch/common/Priority.java | 5 ++ .../common/RandomBasedUUIDGenerator.java | 5 ++ .../org/opensearch/common/Randomness.java | 2 + .../java/org/opensearch/common/Rounding.java | 24 +++++++++ .../opensearch/common/SecureRandomHolder.java | 5 ++ .../java/org/opensearch/common/StopWatch.java | 4 +- .../java/org/opensearch/common/Strings.java | 5 ++ .../common/SuppressLoggerChecks.java | 2 + .../java/org/opensearch/common/Table.java | 10 ++++ .../common/TimeBasedUUIDGenerator.java | 2 + .../org/opensearch/common/TriConsumer.java | 2 + .../org/opensearch/common/TriFunction.java | 2 + .../org/opensearch/common/UUIDGenerator.java | 2 + .../java/org/opensearch/common/UUIDs.java | 5 ++ .../common/ValidationException.java | 2 + .../common/blobstore/BlobContainer.java | 2 + .../common/blobstore/BlobMetadata.java | 2 + .../opensearch/common/blobstore/BlobPath.java | 2 + .../common/blobstore/BlobStore.java | 2 + .../common/blobstore/BlobStoreException.java | 5 ++ .../common/blobstore/DeleteResult.java | 2 + .../common/blobstore/fs/FsBlobContainer.java | 2 + .../common/blobstore/fs/FsBlobStore.java | 5 ++ .../support/AbstractBlobContainer.java | 2 + .../support/FilterBlobContainer.java | 5 ++ .../blobstore/support/PlainBlobMetadata.java | 5 ++ .../breaker/ChildMemoryCircuitBreaker.java | 7 +++ .../common/breaker/CircuitBreaker.java | 2 + .../breaker/CircuitBreakingException.java | 2 + .../common/breaker/NoopCircuitBreaker.java | 2 + .../common/bytes/AbstractBytesReference.java | 5 ++ .../opensearch/common/bytes/BytesArray.java | 5 ++ .../common/bytes/BytesReference.java | 2 + .../common/bytes/CompositeBytesReference.java | 2 + .../common/bytes/PagedBytesReference.java | 2 + .../bytes/RecyclingBytesStreamOutput.java | 2 + .../bytes/ReleasableBytesReference.java | 2 + .../org/opensearch/common/cache/Cache.java | 19 +++++++ .../opensearch/common/cache/CacheBuilder.java | 5 ++ .../opensearch/common/cache/CacheLoader.java | 5 ++ .../common/cache/RemovalListener.java | 5 ++ .../common/cache/RemovalNotification.java | 5 ++ .../common/collect/CopyOnWriteHashMap.java | 13 +++++ .../common/collect/EvictingQueue.java | 2 + .../opensearch/common/collect/HppcMaps.java | 5 ++ .../common/collect/ImmutableOpenIntMap.java | 7 +++ .../common/collect/ImmutableOpenMap.java | 7 +++ .../opensearch/common/collect/Iterators.java | 5 ++ .../opensearch/common/collect/MapBuilder.java | 5 ++ .../component/AbstractLifecycleComponent.java | 5 ++ .../common/component/Lifecycle.java | 2 + .../common/component/LifecycleComponent.java | 5 ++ .../common/component/LifecycleListener.java | 5 ++ .../common/compress/CompressedXContent.java | 2 + .../common/compress/Compressor.java | 5 ++ .../common/compress/CompressorFactory.java | 5 ++ .../common/compress/DeflateCompressor.java | 2 + .../compress/NotCompressedException.java | 10 ++-- .../common/compress/NotXContentException.java | 8 ++- .../concurrent/AutoCloseableRefCounted.java | 2 + .../common/concurrent/GatedCloseable.java | 2 + .../common/concurrent/OneWayGate.java | 2 + .../concurrent/RefCountedReleasable.java | 2 + .../common/document/DocumentField.java | 2 + .../opensearch/common/geo/GeoBoundingBox.java | 2 + .../opensearch/common/geo/GeoDistance.java | 2 + .../org/opensearch/common/geo/GeoJson.java | 5 ++ .../common/geo/GeoJsonGeometryFormat.java | 5 ++ .../common/geo/GeoLineDecomposer.java | 2 + .../org/opensearch/common/geo/GeoPoint.java | 5 ++ .../common/geo/GeoPolygonDecomposer.java | 2 + .../opensearch/common/geo/GeoShapeType.java | 2 + .../opensearch/common/geo/GeoShapeUtils.java | 2 + .../org/opensearch/common/geo/GeoUtils.java | 5 ++ .../opensearch/common/geo/GeometryFormat.java | 2 + .../org/opensearch/common/geo/GeometryIO.java | 2 + .../opensearch/common/geo/GeometryParser.java | 2 + .../opensearch/common/geo/ShapeRelation.java | 2 + .../common/geo/ShapesAvailability.java | 5 ++ .../common/geo/SpatialStrategy.java | 8 +++ .../common/geo/WKTGeometryFormat.java | 5 ++ .../common/geo/XShapeCollection.java | 2 + .../common/geo/builders/CircleBuilder.java | 5 ++ .../geo/builders/CoordinatesBuilder.java | 2 + .../common/geo/builders/EnvelopeBuilder.java | 5 ++ .../builders/GeometryCollectionBuilder.java | 5 ++ .../geo/builders/LineStringBuilder.java | 5 ++ .../geo/builders/MultiLineStringBuilder.java | 5 ++ .../geo/builders/MultiPointBuilder.java | 5 ++ .../geo/builders/MultiPolygonBuilder.java | 5 ++ .../common/geo/builders/PointBuilder.java | 5 ++ .../common/geo/builders/PolygonBuilder.java | 2 + .../common/geo/builders/ShapeBuilder.java | 2 + .../common/geo/parsers/CoordinateNode.java | 2 + .../common/geo/parsers/GeoJsonParser.java | 2 + .../common/geo/parsers/GeoWKTParser.java | 2 + .../common/geo/parsers/ShapeParser.java | 2 + .../common/hash/MessageDigests.java | 2 + .../opensearch/common/hash/MurmurHash3.java | 4 ++ .../common/inject/AbstractModule.java | 2 + .../common/inject/AbstractProcessor.java | 2 + .../org/opensearch/common/inject/Binder.java | 2 + .../org/opensearch/common/inject/Binding.java | 2 + .../common/inject/BindingAnnotation.java | 2 + .../common/inject/BindingProcessor.java | 2 + .../common/inject/BoundProviderFactory.java | 2 + .../common/inject/ConfigurationException.java | 2 + .../common/inject/ConstantFactory.java | 4 ++ .../common/inject/ConstructionProxy.java | 2 + .../inject/ConstructionProxyFactory.java | 2 + .../common/inject/ConstructorBindingImpl.java | 10 ++++ .../common/inject/ConstructorInjector.java | 2 + .../inject/ConstructorInjectorStore.java | 2 + .../common/inject/ContextualCallable.java | 4 ++ .../common/inject/CreationException.java | 2 + .../DefaultConstructionProxyFactory.java | 2 + .../common/inject/DeferredLookups.java | 2 + .../common/inject/EncounterImpl.java | 4 ++ .../org/opensearch/common/inject/Exposed.java | 2 + .../common/inject/ExposedKeyFactory.java | 2 + .../common/inject/FactoryProxy.java | 2 + .../org/opensearch/common/inject/Guice.java | 2 + .../common/inject/ImplementedBy.java | 2 + .../common/inject/InheritingState.java | 4 ++ .../common/inject/Initializable.java | 2 + .../common/inject/Initializables.java | 4 ++ .../opensearch/common/inject/Initializer.java | 2 + .../org/opensearch/common/inject/Inject.java | 2 + .../inject/InjectionRequestProcessor.java | 2 + .../opensearch/common/inject/Injector.java | 2 + .../common/inject/InjectorBuilder.java | 2 + .../common/inject/InjectorImpl.java | 17 ++++++ .../common/inject/InjectorShell.java | 22 ++++++++ .../InternalFactoryToProviderAdapter.java | 4 ++ .../org/opensearch/common/inject/Key.java | 12 +++++ .../common/inject/LookupProcessor.java | 2 + .../org/opensearch/common/inject/Lookups.java | 2 + .../common/inject/MembersInjector.java | 2 + .../common/inject/MembersInjectorImpl.java | 2 + .../common/inject/MembersInjectorStore.java | 2 + .../common/inject/MessageProcessor.java | 2 + .../org/opensearch/common/inject/Module.java | 2 + .../common/inject/ModulesBuilder.java | 5 ++ .../common/inject/OutOfScopeException.java | 2 + .../common/inject/PreProcessModule.java | 2 +- .../common/inject/PrivateBinder.java | 2 + .../inject/PrivateElementProcessor.java | 2 + .../common/inject/PrivateModule.java | 2 + .../opensearch/common/inject/ProvidedBy.java | 2 + .../opensearch/common/inject/Provider.java | 2 + .../ProviderToInternalFactoryAdapter.java | 4 ++ .../opensearch/common/inject/Provides.java | 2 + .../common/inject/ProvisionException.java | 2 + .../opensearch/common/inject/Reflection.java | 2 + .../org/opensearch/common/inject/Scope.java | 2 + .../common/inject/ScopeAnnotation.java | 2 + .../common/inject/ScopeBindingProcessor.java | 2 + .../org/opensearch/common/inject/Scopes.java | 2 + .../common/inject/SingleFieldInjector.java | 2 + .../common/inject/SingleMemberInjector.java | 2 + .../common/inject/SingleMethodInjector.java | 2 + .../inject/SingleParameterInjector.java | 2 + .../opensearch/common/inject/Singleton.java | 2 + .../org/opensearch/common/inject/Stage.java | 2 + .../org/opensearch/common/inject/State.java | 2 + .../inject/TypeConverterBindingProcessor.java | 2 + .../inject/TypeListenerBindingProcessor.java | 2 + .../opensearch/common/inject/TypeLiteral.java | 2 + .../opensearch/common/inject/WeakKeySet.java | 2 + .../inject/assistedinject/Assisted.java | 2 + .../assistedinject/AssistedConstructor.java | 2 + .../inject/assistedinject/AssistedInject.java | 2 + .../assistedinject/FactoryProvider.java | 2 + .../inject/assistedinject/Parameter.java | 2 + .../assistedinject/ParameterListKey.java | 2 + .../binder/AnnotatedBindingBuilder.java | 2 + .../AnnotatedConstantBindingBuilder.java | 2 + .../binder/AnnotatedElementBuilder.java | 2 + .../inject/binder/ConstantBindingBuilder.java | 2 + .../inject/binder/LinkedBindingBuilder.java | 2 + .../inject/binder/ScopedBindingBuilder.java | 2 + .../internal/AbstractBindingBuilder.java | 2 + .../common/inject/internal/Annotations.java | 2 + .../inject/internal/BindingBuilder.java | 2 + .../common/inject/internal/BindingImpl.java | 4 ++ .../internal/ConstantBindingBuilderImpl.java | 2 + .../inject/internal/ConstructionContext.java | 7 +++ .../common/inject/internal/ErrorHandler.java | 2 + .../common/inject/internal/Errors.java | 7 +++ .../inject/internal/ErrorsException.java | 2 + .../inject/internal/ExpirationTimer.java | 2 + .../inject/internal/ExposedBindingImpl.java | 5 ++ .../inject/internal/ExposureBuilder.java | 2 + .../common/inject/internal/FailableCache.java | 2 + .../inject/internal/InstanceBindingImpl.java | 5 ++ .../inject/internal/InternalContext.java | 2 + .../inject/internal/InternalFactory.java | 2 + .../inject/internal/LinkedBindingImpl.java | 5 ++ .../internal/LinkedProviderBindingImpl.java | 5 ++ .../inject/internal/MatcherAndConverter.java | 4 ++ .../common/inject/internal/MoreTypes.java | 16 ++++++ .../common/inject/internal/Nullability.java | 2 + .../inject/internal/PrivateElementsImpl.java | 4 ++ .../internal/ProviderInstanceBindingImpl.java | 5 ++ .../inject/internal/ProviderMethod.java | 2 + .../internal/ProviderMethodsModule.java | 2 + .../common/inject/internal/Scoping.java | 2 + .../inject/internal/SourceProvider.java | 2 + .../inject/internal/StackTraceElements.java | 2 + .../common/inject/internal/Stopwatch.java | 2 + .../common/inject/internal/Strings.java | 2 + .../inject/internal/ToStringBuilder.java | 2 + .../inject/internal/UniqueAnnotations.java | 4 ++ .../internal/UntargettedBindingImpl.java | 5 ++ .../inject/matcher/AbstractMatcher.java | 12 +++++ .../common/inject/matcher/Matcher.java | 2 + .../common/inject/matcher/Matchers.java | 52 +++++++++++++++++++ .../common/inject/multibindings/Element.java | 2 + .../inject/multibindings/MapBinder.java | 7 +++ .../inject/multibindings/Multibinder.java | 2 + .../inject/multibindings/RealElement.java | 4 ++ .../opensearch/common/inject/name/Named.java | 2 + .../common/inject/name/NamedImpl.java | 5 ++ .../opensearch/common/inject/name/Names.java | 2 + .../inject/spi/BindingScopingVisitor.java | 2 + .../inject/spi/BindingTargetVisitor.java | 2 + .../common/inject/spi/ConstructorBinding.java | 2 + .../inject/spi/ConvertedConstantBinding.java | 2 + .../spi/DefaultBindingScopingVisitor.java | 2 + .../spi/DefaultBindingTargetVisitor.java | 2 + .../inject/spi/DefaultElementVisitor.java | 2 + .../common/inject/spi/Dependency.java | 2 + .../opensearch/common/inject/spi/Element.java | 2 + .../common/inject/spi/ElementVisitor.java | 2 + .../common/inject/spi/Elements.java | 7 +++ .../common/inject/spi/ExposedBinding.java | 2 + .../common/inject/spi/HasDependencies.java | 2 + .../common/inject/spi/InjectionListener.java | 2 + .../common/inject/spi/InjectionPoint.java | 2 + .../common/inject/spi/InjectionRequest.java | 2 + .../common/inject/spi/InstanceBinding.java | 2 + .../common/inject/spi/LinkedKeyBinding.java | 2 + .../inject/spi/MembersInjectorLookup.java | 2 + .../opensearch/common/inject/spi/Message.java | 2 + .../common/inject/spi/PrivateElements.java | 2 + .../common/inject/spi/ProviderBinding.java | 2 + .../inject/spi/ProviderInstanceBinding.java | 2 + .../common/inject/spi/ProviderKeyBinding.java | 2 + .../common/inject/spi/ProviderLookup.java | 7 +++ .../inject/spi/ProviderWithDependencies.java | 2 + .../common/inject/spi/ScopeBinding.java | 2 + .../inject/spi/StaticInjectionRequest.java | 2 + .../common/inject/spi/TypeConverter.java | 2 + .../inject/spi/TypeConverterBinding.java | 2 + .../common/inject/spi/TypeEncounter.java | 2 + .../common/inject/spi/TypeListener.java | 2 + .../inject/spi/TypeListenerBinding.java | 2 + .../common/inject/spi/UntargettedBinding.java | 2 + .../common/inject/util/Modules.java | 7 +++ .../common/inject/util/Providers.java | 2 + .../opensearch/common/inject/util/Types.java | 2 + .../org/opensearch/common/io/Channels.java | 5 ++ .../common/io/DiskIoBufferPool.java | 5 ++ .../opensearch/common/io/FileSystemUtils.java | 2 + .../org/opensearch/common/io/Streams.java | 6 +++ .../common/io/UTF8StreamWriter.java | 5 ++ .../io/stream/ByteBufferStreamInput.java | 5 ++ .../common/io/stream/BytesStream.java | 5 ++ .../common/io/stream/BytesStreamInput.java | 2 + .../common/io/stream/BytesStreamOutput.java | 2 + .../io/stream/DataOutputStreamOutput.java | 5 ++ .../common/io/stream/DelayableWriteable.java | 9 ++++ .../common/io/stream/FilterStreamInput.java | 2 + .../io/stream/InputStreamStreamInput.java | 5 ++ .../common/io/stream/NamedWriteable.java | 2 + .../NamedWriteableAwareStreamInput.java | 2 + .../io/stream/NamedWriteableRegistry.java | 8 ++- .../NotSerializableExceptionWrapper.java | 2 + .../io/stream/OutputStreamStreamOutput.java | 5 ++ .../stream/ReleasableBytesStreamOutput.java | 2 + .../common/io/stream/StreamInput.java | 2 + .../common/io/stream/StreamOutput.java | 2 + .../io/stream/VersionedNamedWriteable.java | 2 + .../common/io/stream/Writeable.java | 2 + .../java/org/opensearch/common/joda/Joda.java | 17 ++++++ .../common/joda/JodaDateFormatter.java | 5 ++ .../common/joda/JodaDateMathParser.java | 2 + .../common/joda/JodaDeprecationPatterns.java | 5 ++ .../opensearch/common/lease/Releasable.java | 2 + .../opensearch/common/lease/Releasables.java | 6 ++- .../common/logging/DeprecatedMessage.java | 2 + .../common/logging/DeprecationLogger.java | 2 + .../common/logging/HeaderWarning.java | 2 + .../common/logging/HeaderWarningAppender.java | 5 ++ .../JsonThrowablePatternConverter.java | 2 + .../common/logging/LogConfigurator.java | 5 ++ .../common/logging/LoggerMessageFormat.java | 2 + .../opensearch/common/logging/Loggers.java | 2 + .../common/logging/LoggingOutputStream.java | 2 + .../logging/NodeAndClusterIdConverter.java | 2 + .../NodeAndClusterIdStateListener.java | 2 + .../logging/NodeNamePatternConverter.java | 2 + .../common/logging/OpenSearchJsonLayout.java | 7 +++ .../common/logging/OpenSearchLogMessage.java | 2 + .../OpenSearchMessageFieldConverter.java | 2 + .../common/logging/PrefixLogger.java | 2 + .../common/logging/RateLimitingFilter.java | 5 ++ .../opensearch/common/lucene/BytesRefs.java | 5 ++ .../common/lucene/LoggerInfoStream.java | 8 ++- .../org/opensearch/common/lucene/Lucene.java | 5 ++ .../common/lucene/MinimumScoreCollector.java | 5 ++ .../opensearch/common/lucene/ScorerAware.java | 5 ++ .../common/lucene/ShardCoreKeyMap.java | 2 + .../lucene/index/FilterableTermsEnum.java | 7 +++ .../common/lucene/index/FreqTermsEnum.java | 2 + .../index/OpenSearchDirectoryReader.java | 2 + .../lucene/index/OpenSearchLeafReader.java | 2 + .../SequentialStoredFieldsLeafReader.java | 2 + .../lucene/search/AutomatonQueries.java | 2 + .../lucene/search/FilteredCollector.java | 5 ++ .../lucene/search/MoreLikeThisQuery.java | 5 ++ .../lucene/search/MultiPhrasePrefixQuery.java | 5 ++ .../common/lucene/search/Queries.java | 10 ++++ .../SpanBooleanQueryRewriteWithMaxClause.java | 2 + .../lucene/search/TopDocsAndMaxScore.java | 2 + .../common/lucene/search/XMoreLikeThis.java | 11 ++++ .../search/function/CombineFunction.java | 5 ++ .../function/FieldValueFactorFunction.java | 2 + .../search/function/FunctionScoreQuery.java | 12 +++++ .../lucene/search/function/Functions.java | 2 + .../search/function/LeafScoreFunction.java | 6 ++- .../search/function/MinScoreScorer.java | 8 ++- .../search/function/RandomScoreFunction.java | 2 + .../lucene/search/function/ScoreFunction.java | 5 ++ .../search/function/ScriptScoreFunction.java | 5 ++ .../search/function/ScriptScoreQuery.java | 14 +++++ .../search/function/WeightFactorFunction.java | 10 ++++ .../lucene/store/ByteArrayIndexInput.java | 2 + .../lucene/store/FilterIndexOutput.java | 2 + .../lucene/store/IndexOutputOutputStream.java | 2 + .../lucene/store/InputStreamIndexInput.java | 5 ++ .../uid/PerThreadIDVersionAndSeqNoLookup.java | 2 + .../common/lucene/uid/Versions.java | 5 ++ .../lucene/uid/VersionsAndSeqNoResolver.java | 18 +++++-- .../common/metrics/CounterMetric.java | 5 ++ .../opensearch/common/metrics/MeanMetric.java | 5 ++ .../org/opensearch/common/metrics/Metric.java | 5 ++ .../org/opensearch/common/network/Cidrs.java | 5 ++ .../common/network/CloseableChannel.java | 5 ++ .../opensearch/common/network/IfConfig.java | 2 + .../common/network/InetAddresses.java | 5 ++ .../common/network/NetworkAddress.java | 2 + .../common/network/NetworkModule.java | 2 + .../common/network/NetworkService.java | 5 ++ .../common/network/NetworkUtils.java | 2 + .../org/opensearch/common/path/PathTrie.java | 5 ++ .../common/recycler/AbstractRecycler.java | 5 ++ .../common/recycler/AbstractRecyclerC.java | 5 ++ .../recycler/ConcurrentDequeRecycler.java | 2 + .../common/recycler/DequeRecycler.java | 2 + .../common/recycler/FilterRecycler.java | 5 ++ .../common/recycler/NoneRecycler.java | 10 ++++ .../opensearch/common/recycler/Recycler.java | 2 + .../opensearch/common/recycler/Recyclers.java | 5 ++ .../org/opensearch/common/regex/Regex.java | 5 ++ .../common/rounding/DateTimeUnit.java | 5 ++ .../opensearch/common/rounding/Rounding.java | 22 ++++++++ .../settings/AbstractScopedSettings.java | 2 + .../common/settings/BaseKeyStoreCommand.java | 5 ++ .../ChangeKeyStorePasswordCommand.java | 2 + .../common/settings/ClusterSettings.java | 2 + .../settings/ConsistentSettingsService.java | 2 + .../settings/HasPasswordKeyStoreCommand.java | 5 ++ .../common/settings/IndexScopedSettings.java | 2 + .../common/settings/KeyStoreWrapper.java | 8 ++- .../settings/NoClassSettingsException.java | 2 +- .../common/settings/PropertyPlaceholder.java | 2 + .../common/settings/SecureSetting.java | 17 ++++++ .../common/settings/SecureSettings.java | 2 + .../common/settings/SecureString.java | 2 + .../opensearch/common/settings/Setting.java | 22 ++++++++ .../common/settings/SettingUpgrader.java | 2 + .../opensearch/common/settings/Settings.java | 11 ++++ .../common/settings/SettingsException.java | 2 +- .../common/settings/SettingsFilter.java | 2 + .../common/settings/SettingsModule.java | 2 + .../settings/UpgradeKeyStoreCommand.java | 2 + .../java/org/opensearch/common/text/Text.java | 2 + .../opensearch/common/time/DateFormatter.java | 5 ++ .../common/time/DateFormatters.java | 5 ++ .../common/time/DateMathParser.java | 2 + .../org/opensearch/common/time/DateUtils.java | 5 ++ .../common/time/DateUtilsRounding.java | 2 + .../org/opensearch/common/time/EpochTime.java | 7 +++ .../opensearch/common/time/FormatNames.java | 5 ++ .../common/time/IsoCalendarDataProvider.java | 2 + .../common/time/JavaDateFormatter.java | 5 ++ .../common/time/JavaDateMathParser.java | 2 + .../transport/BoundTransportAddress.java | 2 + .../transport/NetworkExceptionHelper.java | 5 ++ .../common/transport/PortsRange.java | 5 ++ .../common/transport/TransportAddress.java | 2 + .../opensearch/common/unit/ByteSizeUnit.java | 2 + .../opensearch/common/unit/ByteSizeValue.java | 7 +++ .../opensearch/common/unit/DistanceUnit.java | 4 ++ .../org/opensearch/common/unit/Fuzziness.java | 2 + .../common/unit/MemorySizeValue.java | 6 ++- .../opensearch/common/unit/RatioValue.java | 2 + .../org/opensearch/common/unit/SizeUnit.java | 5 ++ .../org/opensearch/common/unit/SizeValue.java | 5 ++ .../opensearch/common/util/AbstractArray.java | 5 ++ .../common/util/AbstractBigArray.java | 6 ++- .../opensearch/common/util/AbstractHash.java | 2 + .../common/util/AbstractPagedHashMap.java | 2 + .../opensearch/common/util/ArrayUtils.java | 5 ++ .../org/opensearch/common/util/BigArray.java | 6 ++- .../org/opensearch/common/util/BigArrays.java | 40 ++++++++++++++ .../opensearch/common/util/BigByteArray.java | 2 + .../common/util/BigDoubleArray.java | 2 + .../opensearch/common/util/BigFloatArray.java | 2 + .../opensearch/common/util/BigIntArray.java | 2 + .../opensearch/common/util/BigLongArray.java | 2 + .../common/util/BigObjectArray.java | 2 + .../common/util/BinarySearcher.java | 2 + .../org/opensearch/common/util/BitArray.java | 2 + .../org/opensearch/common/util/ByteArray.java | 2 + .../org/opensearch/common/util/ByteUtils.java | 8 ++- .../opensearch/common/util/BytesRefHash.java | 2 + .../common/util/CachedSupplier.java | 2 + .../common/util/CancellableThreads.java | 7 +++ .../common/util/CollectionUtils.java | 11 +++- .../common/util/CombinedRateLimiter.java | 2 + .../opensearch/common/util/Comparators.java | 2 + .../org/opensearch/common/util/Countable.java | 5 ++ .../opensearch/common/util/CuckooFilter.java | 2 + .../opensearch/common/util/DoubleArray.java | 2 + .../opensearch/common/util/FeatureFlags.java | 2 + .../opensearch/common/util/FloatArray.java | 2 + .../org/opensearch/common/util/IntArray.java | 2 + .../common/util/LazyInitializable.java | 2 + .../opensearch/common/util/LocaleUtils.java | 2 + .../org/opensearch/common/util/LongArray.java | 2 + .../org/opensearch/common/util/LongHash.java | 2 + .../opensearch/common/util/LongLongHash.java | 2 + .../common/util/LongObjectPagedHashMap.java | 2 + .../java/org/opensearch/common/util/Maps.java | 5 ++ .../opensearch/common/util/ObjectArray.java | 2 + .../common/util/PageCacheRecycler.java | 6 ++- .../opensearch/common/util/PlainIterator.java | 5 ++ .../util/SetBackedScalingCuckooFilter.java | 2 + .../common/util/SingleObjectCache.java | 2 + .../opensearch/common/util/URIPattern.java | 2 + .../util/concurrent/AbstractAsyncTask.java | 2 + .../concurrent/AbstractLifecycleRunnable.java | 2 + .../util/concurrent/AbstractRunnable.java | 2 + .../util/concurrent/AsyncIOProcessor.java | 2 + .../common/util/concurrent/AtomicArray.java | 2 + .../common/util/concurrent/BaseFuture.java | 5 ++ .../concurrent/ConcurrentCollections.java | 5 ++ .../concurrent/ConcurrentHashMapLong.java | 5 ++ .../util/concurrent/ConcurrentMapLong.java | 5 ++ .../common/util/concurrent/CountDown.java | 2 + .../common/util/concurrent/FutureUtils.java | 5 ++ .../common/util/concurrent/KeyedLock.java | 3 +- .../util/concurrent/ListenableFuture.java | 2 + .../concurrent/OpenSearchAbortPolicy.java | 5 ++ .../util/concurrent/OpenSearchExecutors.java | 17 ++++++ .../OpenSearchRejectedExecutionException.java | 5 ++ .../OpenSearchThreadPoolExecutor.java | 2 + .../util/concurrent/PrioritizedCallable.java | 10 ++++ ...ioritizedOpenSearchThreadPoolExecutor.java | 7 +++ .../util/concurrent/PrioritizedRunnable.java | 10 ++++ ...eResizingOpenSearchThreadPoolExecutor.java | 2 + .../util/concurrent/ReleasableLock.java | 2 + .../concurrent/ResizableBlockingQueue.java | 2 + .../common/util/concurrent/RunOnce.java | 2 + .../util/concurrent/SizeBlockingQueue.java | 2 + .../common/util/concurrent/ThreadContext.java | 6 +++ .../common/util/concurrent/TimedRunnable.java | 2 + .../UncategorizedExecutionException.java | 5 ++ .../util/concurrent/WrappedRunnable.java | 5 ++ .../concurrent/XRejectedExecutionHandler.java | 5 ++ .../common/util/iterable/Iterables.java | 15 ++++++ .../org/opensearch/common/util/set/Sets.java | 10 ++++ .../xcontent/LoggingDeprecationHandler.java | 2 + .../common/xcontent/ObjectParserHelper.java | 2 + .../common/xcontent/ParseFieldRegistry.java | 2 + .../xcontent/StatusToXContentObject.java | 2 + .../xcontent/SuggestingErrorOnUnknown.java | 5 ++ .../common/xcontent/XContentHelper.java | 5 ++ .../xcontent/XContentOpenSearchExtension.java | 2 + .../common/xcontent/XContentParserUtils.java | 2 + .../xcontent/support/XContentMapValues.java | 5 ++ .../InternalSnapshotsInfoService.java | 11 ++++ .../opensearch/snapshots/RestoreService.java | 5 ++ .../opensearch/snapshots/SnapshotInfo.java | 5 ++ 511 files changed, 2018 insertions(+), 28 deletions(-) diff --git a/server/src/main/java/org/opensearch/common/AsyncBiFunction.java b/server/src/main/java/org/opensearch/common/AsyncBiFunction.java index 916a0c09cf83d..12e6377682723 100644 --- a/server/src/main/java/org/opensearch/common/AsyncBiFunction.java +++ b/server/src/main/java/org/opensearch/common/AsyncBiFunction.java @@ -35,6 +35,8 @@ /** * A {@link java.util.function.BiFunction}-like interface designed to be used with asynchronous executions. + * + * @opensearch.internal */ public interface AsyncBiFunction { diff --git a/server/src/main/java/org/opensearch/common/CheckedBiConsumer.java b/server/src/main/java/org/opensearch/common/CheckedBiConsumer.java index 1dc133584829e..50c15bb7a95a8 100644 --- a/server/src/main/java/org/opensearch/common/CheckedBiConsumer.java +++ b/server/src/main/java/org/opensearch/common/CheckedBiConsumer.java @@ -36,6 +36,8 @@ /** * A {@link BiConsumer}-like interface which allows throwing checked exceptions. + * + * @opensearch.internal */ @FunctionalInterface public interface CheckedBiConsumer { diff --git a/server/src/main/java/org/opensearch/common/CheckedBiFunction.java b/server/src/main/java/org/opensearch/common/CheckedBiFunction.java index 057c189e2ce0a..100588eb6d966 100644 --- a/server/src/main/java/org/opensearch/common/CheckedBiFunction.java +++ b/server/src/main/java/org/opensearch/common/CheckedBiFunction.java @@ -34,6 +34,8 @@ /** * A {@link java.util.function.BiFunction}-like interface which allows throwing checked exceptions. + * + * @opensearch.internal */ @FunctionalInterface public interface CheckedBiFunction { diff --git a/server/src/main/java/org/opensearch/common/CheckedSupplier.java b/server/src/main/java/org/opensearch/common/CheckedSupplier.java index 8ef1b026c7991..3099146901001 100644 --- a/server/src/main/java/org/opensearch/common/CheckedSupplier.java +++ b/server/src/main/java/org/opensearch/common/CheckedSupplier.java @@ -36,6 +36,8 @@ /** * A {@link Supplier}-like interface which allows throwing checked exceptions. + * + * @opensearch.internal */ @FunctionalInterface public interface CheckedSupplier { diff --git a/server/src/main/java/org/opensearch/common/Classes.java b/server/src/main/java/org/opensearch/common/Classes.java index 5a59e6f9862a0..1b297639aff6a 100644 --- a/server/src/main/java/org/opensearch/common/Classes.java +++ b/server/src/main/java/org/opensearch/common/Classes.java @@ -34,6 +34,11 @@ import java.lang.reflect.Modifier; +/** + * Base class utilities + * + * @opensearch.internal + */ public class Classes { /** diff --git a/server/src/main/java/org/opensearch/common/Explicit.java b/server/src/main/java/org/opensearch/common/Explicit.java index 8607ba49415f5..66e079c461e75 100644 --- a/server/src/main/java/org/opensearch/common/Explicit.java +++ b/server/src/main/java/org/opensearch/common/Explicit.java @@ -43,6 +43,7 @@ * field mapping settings it is preferable to preserve an explicit * choice rather than a choice made only made implicitly by defaults. * + * @opensearch.internal */ public class Explicit { diff --git a/server/src/main/java/org/opensearch/common/ExponentiallyWeightedMovingAverage.java b/server/src/main/java/org/opensearch/common/ExponentiallyWeightedMovingAverage.java index 4c38483329dec..a6c236fe4fa0a 100644 --- a/server/src/main/java/org/opensearch/common/ExponentiallyWeightedMovingAverage.java +++ b/server/src/main/java/org/opensearch/common/ExponentiallyWeightedMovingAverage.java @@ -37,6 +37,8 @@ /** * Implements exponentially weighted moving averages (commonly abbreviated EWMA) for a single value. * This class is safe to share between threads. + * + * @opensearch.internal */ public class ExponentiallyWeightedMovingAverage { diff --git a/server/src/main/java/org/opensearch/common/FieldMemoryStats.java b/server/src/main/java/org/opensearch/common/FieldMemoryStats.java index 8de38292e4cd0..12a693d6ee512 100644 --- a/server/src/main/java/org/opensearch/common/FieldMemoryStats.java +++ b/server/src/main/java/org/opensearch/common/FieldMemoryStats.java @@ -46,6 +46,8 @@ /** * A reusable class to encode {@code field -> memory size} mappings + * + * @opensearch.internal */ public final class FieldMemoryStats implements Writeable, Iterable> { diff --git a/server/src/main/java/org/opensearch/common/LegacyTimeBasedUUIDGenerator.java b/server/src/main/java/org/opensearch/common/LegacyTimeBasedUUIDGenerator.java index f9a7572afa2bf..1e2d9b87281d6 100644 --- a/server/src/main/java/org/opensearch/common/LegacyTimeBasedUUIDGenerator.java +++ b/server/src/main/java/org/opensearch/common/LegacyTimeBasedUUIDGenerator.java @@ -39,6 +39,8 @@ * These are essentially flake ids, but we use 6 (not 8) bytes for timestamp, and use 3 (not 2) bytes for sequence number. * For more information about flake ids, check out * https://archive.fo/2015.07.08-082503/http://www.boundary.com/blog/2012/01/flake-a-decentralized-k-ordered-unique-id-generator-in-erlang/ + * + * @opensearch.internal */ class LegacyTimeBasedUUIDGenerator implements UUIDGenerator { diff --git a/server/src/main/java/org/opensearch/common/LocalTimeOffset.java b/server/src/main/java/org/opensearch/common/LocalTimeOffset.java index 94347c47e56e0..ce2bd2f21ce37 100644 --- a/server/src/main/java/org/opensearch/common/LocalTimeOffset.java +++ b/server/src/main/java/org/opensearch/common/LocalTimeOffset.java @@ -61,6 +61,8 @@ *

* So there are two methods to convert from local time back to utc, * {@link #localToUtc(long, Strategy)} and {@link #localToUtcInThisOffset(long)}. + * + * @opensearch.internal */ public abstract class LocalTimeOffset { /** @@ -206,6 +208,8 @@ public String toString() { /** * How to get instances of {@link LocalTimeOffset}. + * + * @opensearch.internal */ public abstract static class Lookup { /** @@ -234,6 +238,11 @@ public abstract static class Lookup { abstract int size(); } + /** + * No previous local time offset + * + * @opensearch.internal + */ private static class NoPrevious extends LocalTimeOffset { NoPrevious(long millis) { super(millis); @@ -269,6 +278,11 @@ protected String toString(long millis) { } } + /** + * Transition for a local time offset + * + * @opensearch.internal + */ public abstract static class Transition extends LocalTimeOffset { private final LocalTimeOffset previous; private final long startUtcMillis; @@ -307,6 +321,11 @@ public long startUtcMillis() { } } + /** + * Gap for a local time offset + * + * @opensearch.internal + */ public static class Gap extends Transition { private final long firstMissingLocalTime; private final long firstLocalTimeAfterGap; @@ -347,6 +366,11 @@ protected String toString(long millis) { } } + /** + * Overlap for a local time offset + * + * @opensearch.internal + */ public static class Overlap extends Transition { private final long firstOverlappingLocalTime; private final long firstNonOverlappingLocalTime; @@ -403,6 +427,11 @@ protected String toString(long millis) { } } + /** + * Fixed lookup the local time offset + * + * @opensearch.internal + */ private static class FixedLookup extends Lookup { private final ZoneId zone; private final LocalTimeOffset fixed; @@ -441,6 +470,8 @@ public boolean anyMoveBackToPreviousDay() { /** * Looks up transitions by checking whether the date is after the start * of each transition. Simple so fast for small numbers of transitions. + * + * @opensearch.internal */ private static class LinkedListLookup extends AbstractManyTransitionsLookup { private final LocalTimeOffset lastOffset; @@ -477,6 +508,8 @@ public boolean anyMoveBackToPreviousDay() { /** * Builds an array that can be {@link Arrays#binarySearch(long[], long)}ed * for the daylight savings time transitions. + * + * @openearch.internal */ private static class TransitionArrayLookup extends AbstractManyTransitionsLookup { private final LocalTimeOffset[] offsets; @@ -536,6 +569,11 @@ public String toString() { } } + /** + * Base class for many transitions lookup + * + * @opensearch.internal + */ private abstract static class AbstractManyTransitionsLookup extends Lookup { protected final ZoneId zone; protected final long minUtcMillis; diff --git a/server/src/main/java/org/opensearch/common/MacAddressProvider.java b/server/src/main/java/org/opensearch/common/MacAddressProvider.java index 244d3032d2315..db51cc64c5d66 100644 --- a/server/src/main/java/org/opensearch/common/MacAddressProvider.java +++ b/server/src/main/java/org/opensearch/common/MacAddressProvider.java @@ -36,6 +36,11 @@ import java.net.SocketException; import java.util.Enumeration; +/** + * Provider of MAC addressing + * + * @opensearch.internal + */ public class MacAddressProvider { private static byte[] getMacAddress() throws SocketException { diff --git a/server/src/main/java/org/opensearch/common/NamedRegistry.java b/server/src/main/java/org/opensearch/common/NamedRegistry.java index c48cbfaedd7de..a0e98d9126628 100644 --- a/server/src/main/java/org/opensearch/common/NamedRegistry.java +++ b/server/src/main/java/org/opensearch/common/NamedRegistry.java @@ -41,6 +41,8 @@ /** * A registry from String to some class implementation. Used to ensure implementations are registered only once. + * + * @opensearch.internal */ public class NamedRegistry { private final Map registry = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/common/Numbers.java b/server/src/main/java/org/opensearch/common/Numbers.java index e2f5cdc0ab22d..7a87cd58b0e29 100644 --- a/server/src/main/java/org/opensearch/common/Numbers.java +++ b/server/src/main/java/org/opensearch/common/Numbers.java @@ -39,6 +39,8 @@ /** * A set of utilities for numbers. + * + * @opensearch.internal */ public final class Numbers { diff --git a/server/src/main/java/org/opensearch/common/ParsingException.java b/server/src/main/java/org/opensearch/common/ParsingException.java index 31129eaf1d882..02ae1cb0717a3 100644 --- a/server/src/main/java/org/opensearch/common/ParsingException.java +++ b/server/src/main/java/org/opensearch/common/ParsingException.java @@ -46,6 +46,8 @@ * Exception that can be used when parsing queries with a given {@link * XContentParser}. * Can contain information about location of the error. + * + * @opensearch.internal */ public class ParsingException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/common/PidFile.java b/server/src/main/java/org/opensearch/common/PidFile.java index ed3a3c1deb3c5..7033b63d38b6d 100644 --- a/server/src/main/java/org/opensearch/common/PidFile.java +++ b/server/src/main/java/org/opensearch/common/PidFile.java @@ -44,6 +44,8 @@ /** * Process ID file abstraction that writes the current pid into a file and optionally * removes it on system exit. + * + * @opensearch.internal */ public final class PidFile { diff --git a/server/src/main/java/org/opensearch/common/Priority.java b/server/src/main/java/org/opensearch/common/Priority.java index 908e19057e2ca..aadaa695324b6 100644 --- a/server/src/main/java/org/opensearch/common/Priority.java +++ b/server/src/main/java/org/opensearch/common/Priority.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Priority levels. + * + * @opensearch.internal + */ public enum Priority { IMMEDIATE((byte) 0), diff --git a/server/src/main/java/org/opensearch/common/RandomBasedUUIDGenerator.java b/server/src/main/java/org/opensearch/common/RandomBasedUUIDGenerator.java index e8b79f33f2313..fdc53d8335c2f 100644 --- a/server/src/main/java/org/opensearch/common/RandomBasedUUIDGenerator.java +++ b/server/src/main/java/org/opensearch/common/RandomBasedUUIDGenerator.java @@ -38,6 +38,11 @@ import java.util.Base64; import java.util.Random; +/** + * Random UUID generator. + * + * @opensearch.internal + */ class RandomBasedUUIDGenerator implements UUIDGenerator { /** diff --git a/server/src/main/java/org/opensearch/common/Randomness.java b/server/src/main/java/org/opensearch/common/Randomness.java index 419a85cd973c4..2c60e848b9db9 100644 --- a/server/src/main/java/org/opensearch/common/Randomness.java +++ b/server/src/main/java/org/opensearch/common/Randomness.java @@ -56,6 +56,8 @@ * process, non-reproducible sources of randomness are provided (unless * a setting is provided for a module that exposes a seed setting (e.g., * NodeEnvironment#NODE_ID_SEED_SETTING)). + * + * @opensearch.internal */ public final class Randomness { private static final Method currentMethod; diff --git a/server/src/main/java/org/opensearch/common/Rounding.java b/server/src/main/java/org/opensearch/common/Rounding.java index eb6737530a2b0..f5ca75882eac0 100644 --- a/server/src/main/java/org/opensearch/common/Rounding.java +++ b/server/src/main/java/org/opensearch/common/Rounding.java @@ -75,6 +75,8 @@ * See this * blog for some background reading. Its super interesting and the links are * a comedy gold mine. If you like time zones. Or hate them. + * + * @opensearch.internal */ public abstract class Rounding implements Writeable { private static final Logger logger = LogManager.getLogger(Rounding.class); @@ -347,6 +349,11 @@ public static Builder builder(TimeValue interval) { return new Builder(interval); } + /** + * Builder for rounding + * + * @opensearch.internal + */ public static class Builder { private final DateTimeUnit unit; @@ -426,6 +433,11 @@ protected Prepared maybeUseArray(long minUtcMillis, long maxUtcMillis, int max) } } + /** + * Rounding time units + * + * @opensearch.internal + */ static class TimeUnitRounding extends Rounding { static final byte ID = 1; @@ -887,6 +899,11 @@ public final long nextRoundingValue(long utcMillis) { } } + /** + * Rounding time intervals + * + * @opensearch.internal + */ static class TimeIntervalRounding extends Rounding { static final byte ID = 2; @@ -1204,6 +1221,11 @@ public long nextRoundingValue(long utcMillis) { } } + /** + * Rounding offsets + * + * @opensearch.internal + */ static class OffsetRounding extends Rounding { static final byte ID = 3; @@ -1315,6 +1337,8 @@ public static Rounding read(StreamInput in) throws IOException { /** * Implementation of {@link Prepared} using pre-calculated "round down" points. + * + * @opensearch.internal */ private static class ArrayRounding implements Prepared { private final long[] values; diff --git a/server/src/main/java/org/opensearch/common/SecureRandomHolder.java b/server/src/main/java/org/opensearch/common/SecureRandomHolder.java index 37076f8f4e6e4..14844293b3274 100644 --- a/server/src/main/java/org/opensearch/common/SecureRandomHolder.java +++ b/server/src/main/java/org/opensearch/common/SecureRandomHolder.java @@ -34,6 +34,11 @@ import java.security.SecureRandom; +/** + * Random holder that is secure. + * + * @opensearch.internal + */ class SecureRandomHolder { // class loading is atomic - this is a lazy & safe singleton to be used by this package public static final SecureRandom INSTANCE = new SecureRandom(); diff --git a/server/src/main/java/org/opensearch/common/StopWatch.java b/server/src/main/java/org/opensearch/common/StopWatch.java index 973277fae65b7..53b6da4a3bf02 100644 --- a/server/src/main/java/org/opensearch/common/StopWatch.java +++ b/server/src/main/java/org/opensearch/common/StopWatch.java @@ -54,7 +54,7 @@ * This class is normally used to verify performance during proof-of-concepts * and in development, rather than as part of production applications. * - * + * @opensearch.internal */ public class StopWatch { @@ -239,6 +239,8 @@ public String toString() { /** * Inner class to hold data about one task executed within the stop watch. + * + * @opensearch.internal */ public static class TaskInfo { diff --git a/server/src/main/java/org/opensearch/common/Strings.java b/server/src/main/java/org/opensearch/common/Strings.java index 139ace6c481c8..cbf12f264ee30 100644 --- a/server/src/main/java/org/opensearch/common/Strings.java +++ b/server/src/main/java/org/opensearch/common/Strings.java @@ -59,6 +59,11 @@ import static java.util.Collections.unmodifiableSet; import static org.opensearch.common.util.set.Sets.newHashSet; +/** + * String utility class. + * + * @opensearch.internal + */ public class Strings { public static final String[] EMPTY_ARRAY = new String[0]; diff --git a/server/src/main/java/org/opensearch/common/SuppressLoggerChecks.java b/server/src/main/java/org/opensearch/common/SuppressLoggerChecks.java index d93743e03f9db..75d3b63a1841d 100644 --- a/server/src/main/java/org/opensearch/common/SuppressLoggerChecks.java +++ b/server/src/main/java/org/opensearch/common/SuppressLoggerChecks.java @@ -39,6 +39,8 @@ /** * Annotation to suppress logging usage checks errors inside a whole class or a method. + * + * @opensearch.internal */ @Retention(RetentionPolicy.CLASS) @Target({ ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE }) diff --git a/server/src/main/java/org/opensearch/common/Table.java b/server/src/main/java/org/opensearch/common/Table.java index ff32faeb94edf..9c3462e7077cd 100644 --- a/server/src/main/java/org/opensearch/common/Table.java +++ b/server/src/main/java/org/opensearch/common/Table.java @@ -44,6 +44,11 @@ import static java.util.Collections.emptyMap; +/** + * A table. + * + * @opensearch.internal + */ public class Table { private List headers = new ArrayList<>(); @@ -224,6 +229,11 @@ public Map getAliasMap() { return headerAliasMap; } + /** + * Cell in a table + * + * @opensearch.internal + */ public static class Cell { public final Object value; public final Map attr; diff --git a/server/src/main/java/org/opensearch/common/TimeBasedUUIDGenerator.java b/server/src/main/java/org/opensearch/common/TimeBasedUUIDGenerator.java index f76f739787f63..b00a4383b388e 100644 --- a/server/src/main/java/org/opensearch/common/TimeBasedUUIDGenerator.java +++ b/server/src/main/java/org/opensearch/common/TimeBasedUUIDGenerator.java @@ -42,6 +42,8 @@ * structured. * For more information about flake ids, check out * https://archive.fo/2015.07.08-082503/http://www.boundary.com/blog/2012/01/flake-a-decentralized-k-ordered-unique-id-generator-in-erlang/ + * + * @opensearch.internal */ class TimeBasedUUIDGenerator implements UUIDGenerator { diff --git a/server/src/main/java/org/opensearch/common/TriConsumer.java b/server/src/main/java/org/opensearch/common/TriConsumer.java index 2a41b73ad5388..f98276b6d007d 100644 --- a/server/src/main/java/org/opensearch/common/TriConsumer.java +++ b/server/src/main/java/org/opensearch/common/TriConsumer.java @@ -38,6 +38,8 @@ * @param the type of the first argument * @param the type of the second argument * @param the type of the third argument + * + * @opensearch.internal */ @FunctionalInterface public interface TriConsumer { diff --git a/server/src/main/java/org/opensearch/common/TriFunction.java b/server/src/main/java/org/opensearch/common/TriFunction.java index 2ce82eb49aa37..7b1bbece68680 100644 --- a/server/src/main/java/org/opensearch/common/TriFunction.java +++ b/server/src/main/java/org/opensearch/common/TriFunction.java @@ -39,6 +39,8 @@ * @param the type of the second argument * @param the type of the third argument * @param the return type + * + * @opensearch.internal */ @FunctionalInterface public interface TriFunction { diff --git a/server/src/main/java/org/opensearch/common/UUIDGenerator.java b/server/src/main/java/org/opensearch/common/UUIDGenerator.java index bf94d8346e842..8705f415216d8 100644 --- a/server/src/main/java/org/opensearch/common/UUIDGenerator.java +++ b/server/src/main/java/org/opensearch/common/UUIDGenerator.java @@ -34,6 +34,8 @@ /** * Generates opaque unique strings. + * + * @opensearch.internal */ interface UUIDGenerator { String getBase64UUID(); diff --git a/server/src/main/java/org/opensearch/common/UUIDs.java b/server/src/main/java/org/opensearch/common/UUIDs.java index 5ddb628c237fa..a04a10430254f 100644 --- a/server/src/main/java/org/opensearch/common/UUIDs.java +++ b/server/src/main/java/org/opensearch/common/UUIDs.java @@ -36,6 +36,11 @@ import java.util.Random; +/** + * UUID utility class. + * + * @opensearch.internal + */ public class UUIDs { private static final RandomBasedUUIDGenerator RANDOM_UUID_GENERATOR = new RandomBasedUUIDGenerator(); diff --git a/server/src/main/java/org/opensearch/common/ValidationException.java b/server/src/main/java/org/opensearch/common/ValidationException.java index 979d2be5ae148..09e4344df1b80 100644 --- a/server/src/main/java/org/opensearch/common/ValidationException.java +++ b/server/src/main/java/org/opensearch/common/ValidationException.java @@ -37,6 +37,8 @@ /** * Encapsulates an accumulation of validation errors + * + * @opensearch.internal */ public class ValidationException extends IllegalArgumentException { private final List validationErrors = new ArrayList<>(); diff --git a/server/src/main/java/org/opensearch/common/blobstore/BlobContainer.java b/server/src/main/java/org/opensearch/common/blobstore/BlobContainer.java index bdc1d56759963..ac38768c9f3d3 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/BlobContainer.java +++ b/server/src/main/java/org/opensearch/common/blobstore/BlobContainer.java @@ -41,6 +41,8 @@ /** * An interface for managing a repository of blob entries, where each blob entry is just a named group of bytes. + * + * @opensearch.internal */ public interface BlobContainer { diff --git a/server/src/main/java/org/opensearch/common/blobstore/BlobMetadata.java b/server/src/main/java/org/opensearch/common/blobstore/BlobMetadata.java index 52b103eaf79bb..37c70365b6a11 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/BlobMetadata.java +++ b/server/src/main/java/org/opensearch/common/blobstore/BlobMetadata.java @@ -34,6 +34,8 @@ /** * An interface for providing basic metadata about a blob. + * + * @opensearch.internal */ public interface BlobMetadata { diff --git a/server/src/main/java/org/opensearch/common/blobstore/BlobPath.java b/server/src/main/java/org/opensearch/common/blobstore/BlobPath.java index 24aee647e7ac0..d5242fd5e7347 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/BlobPath.java +++ b/server/src/main/java/org/opensearch/common/blobstore/BlobPath.java @@ -41,6 +41,8 @@ /** * The list of paths where a blob can reside. The contents of the paths are dependent upon the implementation of {@link BlobContainer}. + * + * @opensearch.internal */ public class BlobPath implements Iterable { diff --git a/server/src/main/java/org/opensearch/common/blobstore/BlobStore.java b/server/src/main/java/org/opensearch/common/blobstore/BlobStore.java index 42a347d378823..ab40b1e2a082e 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/BlobStore.java +++ b/server/src/main/java/org/opensearch/common/blobstore/BlobStore.java @@ -37,6 +37,8 @@ /** * An interface for storing blobs. + * + * @opensearch.internal */ public interface BlobStore extends Closeable { diff --git a/server/src/main/java/org/opensearch/common/blobstore/BlobStoreException.java b/server/src/main/java/org/opensearch/common/blobstore/BlobStoreException.java index a71a686dbd0d0..71786bb8e80dd 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/BlobStoreException.java +++ b/server/src/main/java/org/opensearch/common/blobstore/BlobStoreException.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Thrown on blob store errors + * + * @opensearch.internal + */ public class BlobStoreException extends OpenSearchException { public BlobStoreException(String msg) { diff --git a/server/src/main/java/org/opensearch/common/blobstore/DeleteResult.java b/server/src/main/java/org/opensearch/common/blobstore/DeleteResult.java index 1a6577cbbb21d..3b424c582ebc6 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/DeleteResult.java +++ b/server/src/main/java/org/opensearch/common/blobstore/DeleteResult.java @@ -34,6 +34,8 @@ /** * The result of deleting multiple blobs from a {@link BlobStore}. + * + * @opensearch.internal */ public final class DeleteResult { diff --git a/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobContainer.java b/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobContainer.java index 0fd20e6bb4990..940192d77630b 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobContainer.java +++ b/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobContainer.java @@ -73,6 +73,8 @@ * Note that the methods in this implementation of {@link org.opensearch.common.blobstore.BlobContainer} may * additionally throw a {@link java.lang.SecurityException} if the configured {@link java.lang.SecurityManager} * does not permit read and/or write access to the underlying files. + * + * @opensearch.internal */ public class FsBlobContainer extends AbstractBlobContainer { diff --git a/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobStore.java b/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobStore.java index 346100ccb9527..f25a741b93c8d 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobStore.java +++ b/server/src/main/java/org/opensearch/common/blobstore/fs/FsBlobStore.java @@ -41,6 +41,11 @@ import java.nio.file.Files; import java.nio.file.Path; +/** + * FileSystem blob store + * + * @opensearch.internal + */ public class FsBlobStore implements BlobStore { private final Path path; diff --git a/server/src/main/java/org/opensearch/common/blobstore/support/AbstractBlobContainer.java b/server/src/main/java/org/opensearch/common/blobstore/support/AbstractBlobContainer.java index ec498404c8803..de167b0a2423f 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/support/AbstractBlobContainer.java +++ b/server/src/main/java/org/opensearch/common/blobstore/support/AbstractBlobContainer.java @@ -37,6 +37,8 @@ /** * A base abstract blob container that implements higher level container methods. + * + * @opensearch.internal */ public abstract class AbstractBlobContainer implements BlobContainer { diff --git a/server/src/main/java/org/opensearch/common/blobstore/support/FilterBlobContainer.java b/server/src/main/java/org/opensearch/common/blobstore/support/FilterBlobContainer.java index 1cf50027b2994..1965aee7f7ef6 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/support/FilterBlobContainer.java +++ b/server/src/main/java/org/opensearch/common/blobstore/support/FilterBlobContainer.java @@ -44,6 +44,11 @@ import java.util.Objects; import java.util.stream.Collectors; +/** + * Filter blob container. + * + * @opensearch.internal + */ public abstract class FilterBlobContainer implements BlobContainer { private final BlobContainer delegate; diff --git a/server/src/main/java/org/opensearch/common/blobstore/support/PlainBlobMetadata.java b/server/src/main/java/org/opensearch/common/blobstore/support/PlainBlobMetadata.java index a97566fd3fc33..8d2aee199ea61 100644 --- a/server/src/main/java/org/opensearch/common/blobstore/support/PlainBlobMetadata.java +++ b/server/src/main/java/org/opensearch/common/blobstore/support/PlainBlobMetadata.java @@ -34,6 +34,11 @@ import org.opensearch.common.blobstore.BlobMetadata; +/** + * Plain blob metadata + * + * @opensearch.internal + */ public class PlainBlobMetadata implements BlobMetadata { private final String name; diff --git a/server/src/main/java/org/opensearch/common/breaker/ChildMemoryCircuitBreaker.java b/server/src/main/java/org/opensearch/common/breaker/ChildMemoryCircuitBreaker.java index 7698771f51170..923f592c6bc79 100644 --- a/server/src/main/java/org/opensearch/common/breaker/ChildMemoryCircuitBreaker.java +++ b/server/src/main/java/org/opensearch/common/breaker/ChildMemoryCircuitBreaker.java @@ -42,6 +42,8 @@ /** * Breaker that will check a parent's when incrementing + * + * @opensearch.internal */ public class ChildMemoryCircuitBreaker implements CircuitBreaker { @@ -268,6 +270,11 @@ public void setLimitAndOverhead(long limit, double overhead) { this.limitAndOverhead = new LimitAndOverhead(limit, overhead); } + /** + * Breaker limit and overhead info + * + * @opensearch.internal + */ private static class LimitAndOverhead { private final long limit; 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 ca6c5aa9698c3..8eaf7aba99945 100644 --- a/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java +++ b/server/src/main/java/org/opensearch/common/breaker/CircuitBreaker.java @@ -37,6 +37,8 @@ /** * Interface for an object that can be incremented, breaking after some * configured limit has been reached. + * + * @opensearch.internal */ public interface CircuitBreaker { diff --git a/server/src/main/java/org/opensearch/common/breaker/CircuitBreakingException.java b/server/src/main/java/org/opensearch/common/breaker/CircuitBreakingException.java index 8983ad3b46e60..ee9977bfa2eb0 100644 --- a/server/src/main/java/org/opensearch/common/breaker/CircuitBreakingException.java +++ b/server/src/main/java/org/opensearch/common/breaker/CircuitBreakingException.java @@ -42,6 +42,8 @@ /** * Exception thrown when the circuit breaker trips + * + * @opensearch.internal */ public class CircuitBreakingException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/common/breaker/NoopCircuitBreaker.java b/server/src/main/java/org/opensearch/common/breaker/NoopCircuitBreaker.java index aa6f3769a07ca..ddd72280faa4f 100644 --- a/server/src/main/java/org/opensearch/common/breaker/NoopCircuitBreaker.java +++ b/server/src/main/java/org/opensearch/common/breaker/NoopCircuitBreaker.java @@ -35,6 +35,8 @@ /** * A CircuitBreaker that doesn't increment or adjust, and all operations are * basically noops + * + * @opensearch.internal */ public class NoopCircuitBreaker implements CircuitBreaker { public static final int LIMIT = -1; diff --git a/server/src/main/java/org/opensearch/common/bytes/AbstractBytesReference.java b/server/src/main/java/org/opensearch/common/bytes/AbstractBytesReference.java index 77ee4df7da2cb..24e200c2da2f3 100644 --- a/server/src/main/java/org/opensearch/common/bytes/AbstractBytesReference.java +++ b/server/src/main/java/org/opensearch/common/bytes/AbstractBytesReference.java @@ -41,6 +41,11 @@ import java.io.OutputStream; import java.util.function.ToIntBiFunction; +/** + * Base bytesref class + * + * @opensearch.internal + */ public abstract class AbstractBytesReference implements BytesReference { private Integer hash = null; // we cache the hash of this reference since it can be quite costly to re-calculated it diff --git a/server/src/main/java/org/opensearch/common/bytes/BytesArray.java b/server/src/main/java/org/opensearch/common/bytes/BytesArray.java index 69f715856c696..aac34b991d186 100644 --- a/server/src/main/java/org/opensearch/common/bytes/BytesArray.java +++ b/server/src/main/java/org/opensearch/common/bytes/BytesArray.java @@ -39,6 +39,11 @@ import java.io.OutputStream; import java.util.Arrays; +/** + * A bytes array. + * + * @opensearch.internal + */ public final class BytesArray extends AbstractBytesReference { public static final BytesArray EMPTY = new BytesArray(BytesRef.EMPTY_BYTES, 0, 0); diff --git a/server/src/main/java/org/opensearch/common/bytes/BytesReference.java b/server/src/main/java/org/opensearch/common/bytes/BytesReference.java index 1107eda4b5a81..3e0623bf8d128 100644 --- a/server/src/main/java/org/opensearch/common/bytes/BytesReference.java +++ b/server/src/main/java/org/opensearch/common/bytes/BytesReference.java @@ -49,6 +49,8 @@ /** * A reference to bytes. + * + * @opensearch.internal */ public interface BytesReference extends Comparable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/common/bytes/CompositeBytesReference.java b/server/src/main/java/org/opensearch/common/bytes/CompositeBytesReference.java index 2a989e33e918f..2d505d14124f2 100644 --- a/server/src/main/java/org/opensearch/common/bytes/CompositeBytesReference.java +++ b/server/src/main/java/org/opensearch/common/bytes/CompositeBytesReference.java @@ -47,6 +47,8 @@ * into one without copying. * * Note, {@link #toBytesRef()} will materialize all pages in this BytesReference. + * + * @opensearch.internal */ public final class CompositeBytesReference extends AbstractBytesReference { diff --git a/server/src/main/java/org/opensearch/common/bytes/PagedBytesReference.java b/server/src/main/java/org/opensearch/common/bytes/PagedBytesReference.java index f9a2c6b95c03b..b7439853f11ba 100644 --- a/server/src/main/java/org/opensearch/common/bytes/PagedBytesReference.java +++ b/server/src/main/java/org/opensearch/common/bytes/PagedBytesReference.java @@ -42,6 +42,8 @@ /** * A page based bytes reference, internally holding the bytes in a paged * data structure. + * + * @opensearch.internal */ public class PagedBytesReference extends AbstractBytesReference { diff --git a/server/src/main/java/org/opensearch/common/bytes/RecyclingBytesStreamOutput.java b/server/src/main/java/org/opensearch/common/bytes/RecyclingBytesStreamOutput.java index e9a9b96ea81ac..28c3f4c9d5349 100644 --- a/server/src/main/java/org/opensearch/common/bytes/RecyclingBytesStreamOutput.java +++ b/server/src/main/java/org/opensearch/common/bytes/RecyclingBytesStreamOutput.java @@ -49,6 +49,8 @@ * {@link BigArrays} if needed. The idea is that you can use this for passing data to an API that requires a single {@code byte[]} (or a * {@link org.apache.lucene.util.BytesRef}) which you'd prefer to re-use if possible, avoiding excessive allocations, but which may not * always be large enough. + * + * @opensearch.internal */ public class RecyclingBytesStreamOutput extends BytesStream { diff --git a/server/src/main/java/org/opensearch/common/bytes/ReleasableBytesReference.java b/server/src/main/java/org/opensearch/common/bytes/ReleasableBytesReference.java index 9ed47ef6cbf39..5989e2fab8826 100644 --- a/server/src/main/java/org/opensearch/common/bytes/ReleasableBytesReference.java +++ b/server/src/main/java/org/opensearch/common/bytes/ReleasableBytesReference.java @@ -45,6 +45,8 @@ /** * An extension to {@link BytesReference} that requires releasing its content. This * class exists to make it explicit when a bytes reference needs to be released, and when not. + * + * @opensearch.internal */ public final class ReleasableBytesReference implements Releasable, BytesReference { diff --git a/server/src/main/java/org/opensearch/common/cache/Cache.java b/server/src/main/java/org/opensearch/common/cache/Cache.java index 8ab0bc9114c0e..007b1bfd3cfda 100644 --- a/server/src/main/java/org/opensearch/common/cache/Cache.java +++ b/server/src/main/java/org/opensearch/common/cache/Cache.java @@ -79,6 +79,8 @@ * * @param The type of the keys * @param The type of the values + * + * @opensearch.internal */ public class Cache { @@ -173,6 +175,11 @@ enum State { DELETED } + /** + * Entry in a cache + * + * @opensearch.internal + */ static class Entry { final K key; final V value; @@ -196,6 +203,8 @@ static class Entry { * * @param the type of the keys * @param the type of the values + * + * @opensearch.internal */ private static class CacheSegment { // read/write lock protecting mutations to the segment @@ -329,6 +338,11 @@ void remove(K key, V value, Consumer>> onRemoval) } } + /** + * Segment statistics + * + * @opensearch.internal + */ private static class SegmentStats { private final LongAdder hits = new LongAdder(); private final LongAdder misses = new LongAdder(); @@ -717,6 +731,11 @@ public CacheStats stats() { return new CacheStats(hits, misses, evictions); } + /** + * Cache statistics + * + * @opensearch.internal + */ public static class CacheStats { private long hits; private long misses; diff --git a/server/src/main/java/org/opensearch/common/cache/CacheBuilder.java b/server/src/main/java/org/opensearch/common/cache/CacheBuilder.java index 9fd340ccca320..b6d7979aa4108 100644 --- a/server/src/main/java/org/opensearch/common/cache/CacheBuilder.java +++ b/server/src/main/java/org/opensearch/common/cache/CacheBuilder.java @@ -37,6 +37,11 @@ import java.util.Objects; import java.util.function.ToLongBiFunction; +/** + * The cache builder. + * + * @opensearch.internal + */ public class CacheBuilder { private long maximumWeight = -1; private long expireAfterAccessNanos = -1; diff --git a/server/src/main/java/org/opensearch/common/cache/CacheLoader.java b/server/src/main/java/org/opensearch/common/cache/CacheLoader.java index 721a1a9885527..3c80fe5d66d5d 100644 --- a/server/src/main/java/org/opensearch/common/cache/CacheLoader.java +++ b/server/src/main/java/org/opensearch/common/cache/CacheLoader.java @@ -32,6 +32,11 @@ package org.opensearch.common.cache; +/** + * An interface for a cache loader. + * + * @opensearch.internal + */ @FunctionalInterface public interface CacheLoader { V load(K key) throws Exception; diff --git a/server/src/main/java/org/opensearch/common/cache/RemovalListener.java b/server/src/main/java/org/opensearch/common/cache/RemovalListener.java index eb84108319b16..369313f9f93f4 100644 --- a/server/src/main/java/org/opensearch/common/cache/RemovalListener.java +++ b/server/src/main/java/org/opensearch/common/cache/RemovalListener.java @@ -32,6 +32,11 @@ package org.opensearch.common.cache; +/** + * Listener for removing an element from the cache + * + * @opensearch.internal + */ @FunctionalInterface public interface RemovalListener { void onRemoval(RemovalNotification notification); 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 89ab6decff43f..f8dc8fa4a6d0f 100644 --- a/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java +++ b/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java @@ -32,6 +32,11 @@ package org.opensearch.common.cache; +/** + * Notification when an element is removed from the cache + * + * @opensearch.internal + */ public class RemovalNotification { public enum RemovalReason { REPLACED, diff --git a/server/src/main/java/org/opensearch/common/collect/CopyOnWriteHashMap.java b/server/src/main/java/org/opensearch/common/collect/CopyOnWriteHashMap.java index 5066ffa76ba0a..5ce77cdc75fe5 100644 --- a/server/src/main/java/org/opensearch/common/collect/CopyOnWriteHashMap.java +++ b/server/src/main/java/org/opensearch/common/collect/CopyOnWriteHashMap.java @@ -62,6 +62,8 @@ * it is better suited for work-loads that are not too write-intensive. * * @see the wikipedia page + * + * @opensearch.internal */ public final class CopyOnWriteHashMap extends AbstractMap { @@ -87,6 +89,8 @@ public static CopyOnWriteHashMap copyOf(Map { @@ -124,6 +128,8 @@ private abstract static class Node { /** * A leaf of the tree where all hashes are equal. Values are added and retrieved in linear time. + * + * @opensearch.internal */ private static class Leaf extends Node { @@ -247,6 +253,8 @@ public static T[] insertElement(final T[] array, final T element, final int * * As a consequence, the number of slots in an inner node is equal to the * number of one bits in the bitmap. + * + * @opensearch.internal */ private static class InnerNode extends Node { @@ -440,6 +448,11 @@ InnerNode remove(Object key, int hash) { } + /** + * Iterates over an entry + * + * @opensearch.internal + */ private static class EntryIterator implements Iterator> { private final Deque> entries; diff --git a/server/src/main/java/org/opensearch/common/collect/EvictingQueue.java b/server/src/main/java/org/opensearch/common/collect/EvictingQueue.java index fd2c23af30e35..3d505b8c38a37 100644 --- a/server/src/main/java/org/opensearch/common/collect/EvictingQueue.java +++ b/server/src/main/java/org/opensearch/common/collect/EvictingQueue.java @@ -60,6 +60,8 @@ * full queue, elements are evicted from the head of the queue to accommodate the new elements. * * @param The type of elements in the queue. + * + * @opensearch.internal */ public class EvictingQueue implements Queue { private final int maximumSize; 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 55696568de47f..7d78b71421069 100644 --- a/server/src/main/java/org/opensearch/common/collect/HppcMaps.java +++ b/server/src/main/java/org/opensearch/common/collect/HppcMaps.java @@ -39,6 +39,11 @@ import java.util.Iterator; +/** + * High performance maps + * + * @opensearch.internal + */ public final class HppcMaps { private HppcMaps() {} diff --git a/server/src/main/java/org/opensearch/common/collect/ImmutableOpenIntMap.java b/server/src/main/java/org/opensearch/common/collect/ImmutableOpenIntMap.java index a5ebb19423732..0bff76e7ec90e 100644 --- a/server/src/main/java/org/opensearch/common/collect/ImmutableOpenIntMap.java +++ b/server/src/main/java/org/opensearch/common/collect/ImmutableOpenIntMap.java @@ -54,6 +54,8 @@ *

* Can be constructed using a {@link #builder()}, or using {@link #builder(org.opensearch.common.collect.ImmutableOpenIntMap)} * (which is an optimized option to copy over existing content and modify it). + * + * @opensearch.internal */ public final class ImmutableOpenIntMap implements Iterable> { @@ -223,6 +225,11 @@ public static Builder builder(ImmutableOpenIntMap map) { return new Builder<>(map); } + /** + * Base builder for an immutable int + * + * @opensearch.internal + */ public static class Builder implements IntObjectMap { private IntObjectHashMap map; diff --git a/server/src/main/java/org/opensearch/common/collect/ImmutableOpenMap.java b/server/src/main/java/org/opensearch/common/collect/ImmutableOpenMap.java index 82b9afd1d3c08..77716c951c524 100644 --- a/server/src/main/java/org/opensearch/common/collect/ImmutableOpenMap.java +++ b/server/src/main/java/org/opensearch/common/collect/ImmutableOpenMap.java @@ -52,6 +52,8 @@ *

* Can be constructed using a {@link #builder()}, or using {@link #builder(ImmutableOpenMap)} (which is an optimized * option to copy over existing content and modify it). + * + * @opensearch.internal */ public final class ImmutableOpenMap implements Iterable> { @@ -238,6 +240,11 @@ public static Builder builder(ImmutableOpenMap(map); } + /** + * Builder for an immuatable map + * + * @opensearch.internal + */ public static class Builder implements ObjectObjectMap { private ObjectObjectHashMap map; 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 a76f4246b1780..9536bbb1ba46b 100644 --- a/server/src/main/java/org/opensearch/common/collect/Iterators.java +++ b/server/src/main/java/org/opensearch/common/collect/Iterators.java @@ -45,6 +45,11 @@ public static Iterator concat(Iterator... iterators) { return new ConcatenatedIterator(iterators); } + /** + * Concat iterators + * + * @opensearch.internal + */ static class ConcatenatedIterator implements Iterator { private final Iterator[] iterators; private int index = 0; diff --git a/server/src/main/java/org/opensearch/common/collect/MapBuilder.java b/server/src/main/java/org/opensearch/common/collect/MapBuilder.java index 39e95d46e3a4a..7a28f02ab4b43 100644 --- a/server/src/main/java/org/opensearch/common/collect/MapBuilder.java +++ b/server/src/main/java/org/opensearch/common/collect/MapBuilder.java @@ -37,6 +37,11 @@ import static java.util.Collections.unmodifiableMap; +/** + * Builder for a map. + * + * @opensearch.internal + */ public class MapBuilder { public static MapBuilder newMapBuilder() { diff --git a/server/src/main/java/org/opensearch/common/component/AbstractLifecycleComponent.java b/server/src/main/java/org/opensearch/common/component/AbstractLifecycleComponent.java index cae81cb0931b3..837f8af44bf13 100644 --- a/server/src/main/java/org/opensearch/common/component/AbstractLifecycleComponent.java +++ b/server/src/main/java/org/opensearch/common/component/AbstractLifecycleComponent.java @@ -37,6 +37,11 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +/** + * Base class for a lifecycle component. + * + * @opensearch.internal + */ public abstract class AbstractLifecycleComponent implements LifecycleComponent { protected final Lifecycle lifecycle = new Lifecycle(); 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 afeb3c97cc027..b0db6435d6126 100644 --- a/server/src/main/java/org/opensearch/common/component/Lifecycle.java +++ b/server/src/main/java/org/opensearch/common/component/Lifecycle.java @@ -72,6 +72,8 @@ * // perform close logic here * } * + * + * @opensearch.internal */ public class Lifecycle { diff --git a/server/src/main/java/org/opensearch/common/component/LifecycleComponent.java b/server/src/main/java/org/opensearch/common/component/LifecycleComponent.java index d0691c54dc220..984d55df1bdfa 100644 --- a/server/src/main/java/org/opensearch/common/component/LifecycleComponent.java +++ b/server/src/main/java/org/opensearch/common/component/LifecycleComponent.java @@ -34,6 +34,11 @@ import org.opensearch.common.lease.Releasable; +/** + * Base interface for a lifecycle component. + * + * @opensearch.internal + */ public interface LifecycleComponent extends Releasable { Lifecycle.State lifecycleState(); diff --git a/server/src/main/java/org/opensearch/common/component/LifecycleListener.java b/server/src/main/java/org/opensearch/common/component/LifecycleListener.java index dedf9a4899739..89c344b955bc9 100644 --- a/server/src/main/java/org/opensearch/common/component/LifecycleListener.java +++ b/server/src/main/java/org/opensearch/common/component/LifecycleListener.java @@ -32,6 +32,11 @@ package org.opensearch.common.component; +/** + * Base lifecycle listener. + * + * @opensearch.internal + */ public abstract class LifecycleListener { public void beforeStart() { diff --git a/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java b/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java index f15e213b9a773..9400955f87a1b 100644 --- a/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java +++ b/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java @@ -54,6 +54,8 @@ * data using a compressed representation in order to require less permanent * memory. Note that the compressed string might still sometimes need to be * decompressed in order to perform equality checks or to compute hash codes. + * + * @opensearch.internal */ public final class CompressedXContent { diff --git a/server/src/main/java/org/opensearch/common/compress/Compressor.java b/server/src/main/java/org/opensearch/common/compress/Compressor.java index b5116598ea4ce..4f55010be2f7f 100644 --- a/server/src/main/java/org/opensearch/common/compress/Compressor.java +++ b/server/src/main/java/org/opensearch/common/compress/Compressor.java @@ -38,6 +38,11 @@ import java.io.InputStream; import java.io.OutputStream; +/** + * Compressor interface + * + * @opensearch.internal + */ public interface Compressor { boolean isCompressed(BytesReference bytes); diff --git a/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java b/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java index 79d785296f9f5..cb30f11fa4157 100644 --- a/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java +++ b/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Factory to create a compressor instance. + * + * @opensearch.internal + */ public class CompressorFactory { public static final Compressor COMPRESSOR = new DeflateCompressor(); diff --git a/server/src/main/java/org/opensearch/common/compress/DeflateCompressor.java b/server/src/main/java/org/opensearch/common/compress/DeflateCompressor.java index b622ac6d3f640..05c5250ee32a4 100644 --- a/server/src/main/java/org/opensearch/common/compress/DeflateCompressor.java +++ b/server/src/main/java/org/opensearch/common/compress/DeflateCompressor.java @@ -51,6 +51,8 @@ /** * {@link Compressor} implementation based on the DEFLATE compression algorithm. + * + * @opensearch.internal */ public class DeflateCompressor implements Compressor { diff --git a/server/src/main/java/org/opensearch/common/compress/NotCompressedException.java b/server/src/main/java/org/opensearch/common/compress/NotCompressedException.java index eedb3c0b9ac98..7f070e0b499d8 100644 --- a/server/src/main/java/org/opensearch/common/compress/NotCompressedException.java +++ b/server/src/main/java/org/opensearch/common/compress/NotCompressedException.java @@ -32,9 +32,13 @@ package org.opensearch.common.compress; -/** Exception indicating that we were expecting something compressed, which - * was not compressed or corrupted so that the compression format could not - * be detected. */ +/** + * Exception indicating that we were expecting something compressed, which + * was not compressed or corrupted so that the compression format could not + * be detected. + * + * @opensearch.internal + */ public class NotCompressedException extends RuntimeException { public NotCompressedException() { diff --git a/server/src/main/java/org/opensearch/common/compress/NotXContentException.java b/server/src/main/java/org/opensearch/common/compress/NotXContentException.java index e06b6ee96ab72..e17676fc1c508 100644 --- a/server/src/main/java/org/opensearch/common/compress/NotXContentException.java +++ b/server/src/main/java/org/opensearch/common/compress/NotXContentException.java @@ -34,8 +34,12 @@ import org.opensearch.common.xcontent.XContent; -/** Exception indicating that we were expecting some {@link XContent} but could - * not detect its type. */ +/** + * Exception indicating that we were expecting some {@link XContent} but could + * not detect its type. + * + * @opensearch.internal + */ public class NotXContentException extends RuntimeException { public NotXContentException(String message) { diff --git a/server/src/main/java/org/opensearch/common/concurrent/AutoCloseableRefCounted.java b/server/src/main/java/org/opensearch/common/concurrent/AutoCloseableRefCounted.java index 795d352542881..926eb9cb6fd45 100644 --- a/server/src/main/java/org/opensearch/common/concurrent/AutoCloseableRefCounted.java +++ b/server/src/main/java/org/opensearch/common/concurrent/AutoCloseableRefCounted.java @@ -18,6 +18,8 @@ /** * Adapter class that enables a {@link RefCounted} implementation to function like an {@link AutoCloseable}. * The {@link #close()} API invokes {@link RefCounted#decRef()} and ensures idempotency using a {@link OneWayGate}. + * + * @opensearch.internal */ public class AutoCloseableRefCounted implements AutoCloseable { diff --git a/server/src/main/java/org/opensearch/common/concurrent/GatedCloseable.java b/server/src/main/java/org/opensearch/common/concurrent/GatedCloseable.java index 467b5e4cfb3ea..8bf620ee2cd50 100644 --- a/server/src/main/java/org/opensearch/common/concurrent/GatedCloseable.java +++ b/server/src/main/java/org/opensearch/common/concurrent/GatedCloseable.java @@ -22,6 +22,8 @@ * Decorator class that wraps an object reference with a {@link CheckedRunnable} that is * invoked when {@link #close()} is called. The internal {@link OneWayGate} instance ensures * that this is invoked only once. See also {@link AutoCloseableRefCounted} + * + * @opensearch.internal */ public class GatedCloseable implements Closeable { diff --git a/server/src/main/java/org/opensearch/common/concurrent/OneWayGate.java b/server/src/main/java/org/opensearch/common/concurrent/OneWayGate.java index 76625094f3ca6..b7ddd755503b5 100644 --- a/server/src/main/java/org/opensearch/common/concurrent/OneWayGate.java +++ b/server/src/main/java/org/opensearch/common/concurrent/OneWayGate.java @@ -18,6 +18,8 @@ /** * Encapsulates logic for a one-way gate. Guarantees idempotency via the {@link AtomicBoolean} instance * and the return value of the {@link #close()} function. + * + * @opensearch.internal */ public class OneWayGate { diff --git a/server/src/main/java/org/opensearch/common/concurrent/RefCountedReleasable.java b/server/src/main/java/org/opensearch/common/concurrent/RefCountedReleasable.java index 975f2295d7c32..f71213779404e 100644 --- a/server/src/main/java/org/opensearch/common/concurrent/RefCountedReleasable.java +++ b/server/src/main/java/org/opensearch/common/concurrent/RefCountedReleasable.java @@ -20,6 +20,8 @@ * Decorator class that wraps an object reference as a {@link AbstractRefCounted} instance. * In addition to a {@link String} name, it accepts a {@link Runnable} shutdown hook that is * invoked when the reference count reaches zero i.e. on {@link #closeInternal()}. + * + * @opensearch.internal */ public class RefCountedReleasable extends AbstractRefCounted implements Releasable { diff --git a/server/src/main/java/org/opensearch/common/document/DocumentField.java b/server/src/main/java/org/opensearch/common/document/DocumentField.java index 9c6be10e5ea59..20c454f9442be 100644 --- a/server/src/main/java/org/opensearch/common/document/DocumentField.java +++ b/server/src/main/java/org/opensearch/common/document/DocumentField.java @@ -55,6 +55,8 @@ * * @see SearchHit * @see GetResult + * + * @opensearch.internal */ public class DocumentField implements Writeable, ToXContentFragment, Iterable { diff --git a/server/src/main/java/org/opensearch/common/geo/GeoBoundingBox.java b/server/src/main/java/org/opensearch/common/geo/GeoBoundingBox.java index 7413c27e63d23..6cf7a0096482c 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoBoundingBox.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoBoundingBox.java @@ -52,6 +52,8 @@ /** * A class representing a Geo-Bounding-Box for use by Geo queries and aggregations * that deal with extents/rectangles representing rectangular areas of interest. + * + * @opensearch.internal */ public class GeoBoundingBox implements ToXContentObject, Writeable { private static final WellKnownText WKT_PARSER = new WellKnownText(true, new StandardValidator(true)); diff --git a/server/src/main/java/org/opensearch/common/geo/GeoDistance.java b/server/src/main/java/org/opensearch/common/geo/GeoDistance.java index f21caaff4a058..1c28233049376 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoDistance.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoDistance.java @@ -42,6 +42,8 @@ /** * Geo distance calculation. + * + * @opensearch.internal */ public enum GeoDistance implements Writeable { PLANE, diff --git a/server/src/main/java/org/opensearch/common/geo/GeoJson.java b/server/src/main/java/org/opensearch/common/geo/GeoJson.java index 529126c46241d..dcce457503992 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoJson.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoJson.java @@ -593,6 +593,11 @@ public String visit(Rectangle rectangle) { }); } + /** + * A node for a geo coordinate + * + * @opensearch.internal + */ private static class CoordinateNode implements ToXContentObject { public final Point coordinate; public final List children; diff --git a/server/src/main/java/org/opensearch/common/geo/GeoJsonGeometryFormat.java b/server/src/main/java/org/opensearch/common/geo/GeoJsonGeometryFormat.java index 26844d8b5c02a..5d93aec870c80 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoJsonGeometryFormat.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoJsonGeometryFormat.java @@ -39,6 +39,11 @@ import java.io.IOException; +/** + * Geometry format for geojson + * + * @opensearch.internal + */ public class GeoJsonGeometryFormat implements GeometryFormat { public static final String NAME = "geojson"; diff --git a/server/src/main/java/org/opensearch/common/geo/GeoLineDecomposer.java b/server/src/main/java/org/opensearch/common/geo/GeoLineDecomposer.java index dea59d042f3cb..e380e6a9e68d5 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoLineDecomposer.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoLineDecomposer.java @@ -42,6 +42,8 @@ /** * Splits lines by datelines. + * + * @opensearch.internal */ public class GeoLineDecomposer { diff --git a/server/src/main/java/org/opensearch/common/geo/GeoPoint.java b/server/src/main/java/org/opensearch/common/geo/GeoPoint.java index a272228af5ab6..a2b06dccded8c 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoPoint.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoPoint.java @@ -56,6 +56,11 @@ import static org.opensearch.index.mapper.AbstractPointGeometryFieldMapper.Names.IGNORE_Z_VALUE; +/** + * Core geo point + * + * @opensearch.internal + */ public class GeoPoint implements ToXContentFragment { protected double lat; diff --git a/server/src/main/java/org/opensearch/common/geo/GeoPolygonDecomposer.java b/server/src/main/java/org/opensearch/common/geo/GeoPolygonDecomposer.java index 6577b10403fa2..bf2192a28a299 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoPolygonDecomposer.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoPolygonDecomposer.java @@ -55,6 +55,8 @@ /** * Splits polygons by datelines. + * + * @opensearch.internal */ public class GeoPolygonDecomposer { diff --git a/server/src/main/java/org/opensearch/common/geo/GeoShapeType.java b/server/src/main/java/org/opensearch/common/geo/GeoShapeType.java index 7b2e90d8ed62b..af96566ebc44a 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoShapeType.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoShapeType.java @@ -57,6 +57,8 @@ /** * Enumeration that lists all {@link GeoShapeType}s that can be parsed and indexed + * + * @opensearch.internal */ public enum GeoShapeType { POINT("point") { diff --git a/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java b/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java index ac248f6bb6dcc..7a59c7a08014b 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java @@ -39,6 +39,8 @@ /** * Utility class that transforms OpenSearch geometry objects to the Lucene representation + * + * @opensearch.internal */ public class GeoShapeUtils { 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 1585e6cf2ad60..9cff3e56b56e3 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoUtils.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoUtils.java @@ -54,6 +54,11 @@ import java.io.IOException; import java.util.Collections; +/** + * Useful geo utilities + * + * @opensearch.internal + */ public class GeoUtils { /** Maximum valid latitude in degrees. */ diff --git a/server/src/main/java/org/opensearch/common/geo/GeometryFormat.java b/server/src/main/java/org/opensearch/common/geo/GeometryFormat.java index c907ee722c1ae..b759def6785d1 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeometryFormat.java +++ b/server/src/main/java/org/opensearch/common/geo/GeometryFormat.java @@ -41,6 +41,8 @@ /** * Geometry serializer/deserializer + * + * @opensearch.internal */ public interface GeometryFormat { diff --git a/server/src/main/java/org/opensearch/common/geo/GeometryIO.java b/server/src/main/java/org/opensearch/common/geo/GeometryIO.java index 113e7a6e9fa0e..09bebda50047a 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeometryIO.java +++ b/server/src/main/java/org/opensearch/common/geo/GeometryIO.java @@ -55,6 +55,8 @@ /** * Utility class for binary serializtion/deserialization of libs/geo classes + * + * @opensearch.internal */ public final class GeometryIO { diff --git a/server/src/main/java/org/opensearch/common/geo/GeometryParser.java b/server/src/main/java/org/opensearch/common/geo/GeometryParser.java index f1fc1f9a1b1d0..e8c1be616ba7e 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeometryParser.java +++ b/server/src/main/java/org/opensearch/common/geo/GeometryParser.java @@ -53,6 +53,8 @@ /** * An utility class with a geometry parser methods supporting different shape representation formats + * + * @opensearch.internal */ public final class GeometryParser { diff --git a/server/src/main/java/org/opensearch/common/geo/ShapeRelation.java b/server/src/main/java/org/opensearch/common/geo/ShapeRelation.java index 96ffe19129db9..19b508734c245 100644 --- a/server/src/main/java/org/opensearch/common/geo/ShapeRelation.java +++ b/server/src/main/java/org/opensearch/common/geo/ShapeRelation.java @@ -43,6 +43,8 @@ /** * Enum representing the relationship between a Query / Filter Shape and indexed Shapes * that will be used to determine if a Document should be matched or not + * + * @opensearch.internal */ public enum ShapeRelation implements Writeable { diff --git a/server/src/main/java/org/opensearch/common/geo/ShapesAvailability.java b/server/src/main/java/org/opensearch/common/geo/ShapesAvailability.java index f1a9638e998ff..abf7e7effb464 100644 --- a/server/src/main/java/org/opensearch/common/geo/ShapesAvailability.java +++ b/server/src/main/java/org/opensearch/common/geo/ShapesAvailability.java @@ -32,6 +32,11 @@ package org.opensearch.common.geo; +/** + * Checks if certain geometry packages are available + * + * @opensearch.internal + */ public class ShapesAvailability { public static final boolean SPATIAL4J_AVAILABLE; diff --git a/server/src/main/java/org/opensearch/common/geo/SpatialStrategy.java b/server/src/main/java/org/opensearch/common/geo/SpatialStrategy.java index 5eda2471e73fe..89bba47fc65a0 100644 --- a/server/src/main/java/org/opensearch/common/geo/SpatialStrategy.java +++ b/server/src/main/java/org/opensearch/common/geo/SpatialStrategy.java @@ -37,6 +37,14 @@ import java.io.IOException; +/** + * Spatial strategy for legacy prefix trees + * + * @deprecated will be removed in future version + * + * @opensearch.internal + */ +@Deprecated public enum SpatialStrategy implements Writeable { TERM("term"), diff --git a/server/src/main/java/org/opensearch/common/geo/WKTGeometryFormat.java b/server/src/main/java/org/opensearch/common/geo/WKTGeometryFormat.java index 84d12d2ebb5ab..f73c94057da9c 100644 --- a/server/src/main/java/org/opensearch/common/geo/WKTGeometryFormat.java +++ b/server/src/main/java/org/opensearch/common/geo/WKTGeometryFormat.java @@ -41,6 +41,11 @@ import java.io.IOException; import java.text.ParseException; +/** + * Well Known Text Format + * + * @opensearch.internal + */ public class WKTGeometryFormat implements GeometryFormat { public static final String NAME = "wkt"; diff --git a/server/src/main/java/org/opensearch/common/geo/XShapeCollection.java b/server/src/main/java/org/opensearch/common/geo/XShapeCollection.java index e505a804e790e..e97bf69eae7d5 100644 --- a/server/src/main/java/org/opensearch/common/geo/XShapeCollection.java +++ b/server/src/main/java/org/opensearch/common/geo/XShapeCollection.java @@ -40,6 +40,8 @@ /** * Extends spatial4j ShapeCollection for points_only shape indexing support + * + * @opensearch.internal */ public class XShapeCollection extends ShapeCollection { diff --git a/server/src/main/java/org/opensearch/common/geo/builders/CircleBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/CircleBuilder.java index fb773ed6654d3..3b64c647df181 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/CircleBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/CircleBuilder.java @@ -47,6 +47,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Builds a circle geometry + * + * @opensearch.internal + */ public class CircleBuilder extends ShapeBuilder { public static final ParseField FIELD_RADIUS = new ParseField("radius"); diff --git a/server/src/main/java/org/opensearch/common/geo/builders/CoordinatesBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/CoordinatesBuilder.java index 9c727830623da..0892e9bd57c8b 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/CoordinatesBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/CoordinatesBuilder.java @@ -44,6 +44,8 @@ * A builder for a list of coordinates. * Enables chaining of individual coordinates either as long/lat pairs * or as {@link Coordinate} elements, arrays or collections. + * + * @opensearch.internal */ public class CoordinatesBuilder { diff --git a/server/src/main/java/org/opensearch/common/geo/builders/EnvelopeBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/EnvelopeBuilder.java index 5513d9912b92c..2bb4ce0472a12 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/EnvelopeBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/EnvelopeBuilder.java @@ -45,6 +45,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Builds an envelope geometry + * + * @opensearch.internal + */ public class EnvelopeBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.ENVELOPE; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/GeometryCollectionBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/GeometryCollectionBuilder.java index 09fec96e0e693..8ff561118374c 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/GeometryCollectionBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/GeometryCollectionBuilder.java @@ -49,6 +49,11 @@ import java.util.List; import java.util.Objects; +/** + * Builds a geometry collection + * + * @opensearch.internal + */ public class GeometryCollectionBuilder extends ShapeBuilder, GeometryCollectionBuilder> { public static final GeoShapeType TYPE = GeoShapeType.GEOMETRYCOLLECTION; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/LineStringBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/LineStringBuilder.java index ae7075ff7bb47..fc9548a4d9072 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/LineStringBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/LineStringBuilder.java @@ -48,6 +48,11 @@ import java.util.Arrays; import java.util.List; +/** + * Builds a line string geometry + * + * @opensearch.internal + */ public class LineStringBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.LINESTRING; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/MultiLineStringBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/MultiLineStringBuilder.java index 9e303b8de2a6e..64ca4aae326c9 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/MultiLineStringBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/MultiLineStringBuilder.java @@ -51,6 +51,11 @@ import java.util.List; import java.util.Objects; +/** + * Builds a multi line string geometry + * + * @opensearch.internal + */ public class MultiLineStringBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.MULTILINESTRING; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/MultiPointBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/MultiPointBuilder.java index 29ec72f4755be..7d5fb4b1c8dd6 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/MultiPointBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/MultiPointBuilder.java @@ -46,6 +46,11 @@ import java.util.List; import java.util.stream.Collectors; +/** + * Builds a multi point geometry + * + * @opensearch.internal + */ public class MultiPointBuilder extends ShapeBuilder, MultiPoint, MultiPointBuilder> { public static final GeoShapeType TYPE = GeoShapeType.MULTIPOINT; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/MultiPolygonBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/MultiPolygonBuilder.java index ac78c09c91b48..27fc84d229d9d 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/MultiPolygonBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/MultiPolygonBuilder.java @@ -50,6 +50,11 @@ import java.util.Locale; import java.util.Objects; +/** + * Builds a multi polygon geometry + * + * @opensearch.internal + */ public class MultiPolygonBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.MULTIPOLYGON; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/PointBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/PointBuilder.java index 86878f736d6e6..885733cde5828 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/PointBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/PointBuilder.java @@ -41,6 +41,11 @@ import java.io.IOException; +/** + * Builds a point geometry + * + * @opensearch.internal + */ public class PointBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.POINT; diff --git a/server/src/main/java/org/opensearch/common/geo/builders/PolygonBuilder.java b/server/src/main/java/org/opensearch/common/geo/builders/PolygonBuilder.java index 5abc01e5aade6..0341d2a1af325 100644 --- a/server/src/main/java/org/opensearch/common/geo/builders/PolygonBuilder.java +++ b/server/src/main/java/org/opensearch/common/geo/builders/PolygonBuilder.java @@ -65,6 +65,8 @@ * The {@link PolygonBuilder} implements the groundwork to create polygons. This contains * Methods to wrap polygons at the dateline and building shapes from the data held by the * builder. + * + * @opensearch.internal */ public class PolygonBuilder extends ShapeBuilder { 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 afd57ad6ab5f3..4e7524400958a 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 @@ -63,6 +63,8 @@ /** * Basic class for building GeoJSON shapes like Polygons, Linestrings, etc + * + * @opensearch.internal */ public abstract class ShapeBuilder> implements diff --git a/server/src/main/java/org/opensearch/common/geo/parsers/CoordinateNode.java b/server/src/main/java/org/opensearch/common/geo/parsers/CoordinateNode.java index c4c091b0e25fe..2404081325592 100644 --- a/server/src/main/java/org/opensearch/common/geo/parsers/CoordinateNode.java +++ b/server/src/main/java/org/opensearch/common/geo/parsers/CoordinateNode.java @@ -44,6 +44,8 @@ *

* Can either be a leaf node consisting of a Coordinate, or a parent with * children + * + * @opensearch.internal */ public class CoordinateNode implements ToXContentObject { public final Coordinate coordinate; diff --git a/server/src/main/java/org/opensearch/common/geo/parsers/GeoJsonParser.java b/server/src/main/java/org/opensearch/common/geo/parsers/GeoJsonParser.java index 45ad538187fa4..28feb0d5c2e95 100644 --- a/server/src/main/java/org/opensearch/common/geo/parsers/GeoJsonParser.java +++ b/server/src/main/java/org/opensearch/common/geo/parsers/GeoJsonParser.java @@ -53,6 +53,8 @@ * Parses shape geometry represented in geojson * * complies with geojson specification: https://tools.ietf.org/html/rfc7946 + * + * @opensearch.internal */ abstract class GeoJsonParser { protected static ShapeBuilder parse(XContentParser parser, AbstractShapeGeometryFieldMapper shapeMapper) throws IOException { diff --git a/server/src/main/java/org/opensearch/common/geo/parsers/GeoWKTParser.java b/server/src/main/java/org/opensearch/common/geo/parsers/GeoWKTParser.java index 7aa5b0a165f90..adccedae88185 100644 --- a/server/src/main/java/org/opensearch/common/geo/parsers/GeoWKTParser.java +++ b/server/src/main/java/org/opensearch/common/geo/parsers/GeoWKTParser.java @@ -60,6 +60,8 @@ * * complies with OGC® document: 12-063r5 and ISO/IEC 13249-3:2016 standard * located at http://docs.opengeospatial.org/is/12-063r5/12-063r5.html + * + * @opensearch.internal */ public class GeoWKTParser { public static final String EMPTY = "EMPTY"; diff --git a/server/src/main/java/org/opensearch/common/geo/parsers/ShapeParser.java b/server/src/main/java/org/opensearch/common/geo/parsers/ShapeParser.java index f2670fd4efff5..c8f3db84ba6c4 100644 --- a/server/src/main/java/org/opensearch/common/geo/parsers/ShapeParser.java +++ b/server/src/main/java/org/opensearch/common/geo/parsers/ShapeParser.java @@ -47,6 +47,8 @@ /** * first point of entry for a shape parser + * + * @opensearch.internal */ public interface ShapeParser { ParseField FIELD_TYPE = new ParseField("type"); diff --git a/server/src/main/java/org/opensearch/common/hash/MessageDigests.java b/server/src/main/java/org/opensearch/common/hash/MessageDigests.java index c2a294828332d..f53f60a3a97a3 100644 --- a/server/src/main/java/org/opensearch/common/hash/MessageDigests.java +++ b/server/src/main/java/org/opensearch/common/hash/MessageDigests.java @@ -40,6 +40,8 @@ * This MessageDigests class provides convenience methods for obtaining * thread local {@link MessageDigest} instances for MD5, SHA-1, and * SHA-256 message digests. + * + * @opensearch.internal */ public final class MessageDigests { diff --git a/server/src/main/java/org/opensearch/common/hash/MurmurHash3.java b/server/src/main/java/org/opensearch/common/hash/MurmurHash3.java index f8b8b92027bba..8ba0bd7ee1be4 100644 --- a/server/src/main/java/org/opensearch/common/hash/MurmurHash3.java +++ b/server/src/main/java/org/opensearch/common/hash/MurmurHash3.java @@ -38,12 +38,16 @@ /** * MurmurHash3 hashing functions. + * + * @opensearch.internal */ public enum MurmurHash3 { ; /** * A 128-bits hash. + * + * @opensearch.internal */ public static class Hash128 { /** lower 64 bits part **/ diff --git a/server/src/main/java/org/opensearch/common/inject/AbstractModule.java b/server/src/main/java/org/opensearch/common/inject/AbstractModule.java index da0473dd25e01..7d2b65c23b6c2 100644 --- a/server/src/main/java/org/opensearch/common/inject/AbstractModule.java +++ b/server/src/main/java/org/opensearch/common/inject/AbstractModule.java @@ -57,6 +57,8 @@ * * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public abstract class AbstractModule implements Module { diff --git a/server/src/main/java/org/opensearch/common/inject/AbstractProcessor.java b/server/src/main/java/org/opensearch/common/inject/AbstractProcessor.java index 53010c50baf02..bc9624b9a13e7 100644 --- a/server/src/main/java/org/opensearch/common/inject/AbstractProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/AbstractProcessor.java @@ -53,6 +53,8 @@ * handled element. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ abstract class AbstractProcessor implements ElementVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/Binder.java b/server/src/main/java/org/opensearch/common/inject/Binder.java index 3782734b0d927..a733a19608ac1 100644 --- a/server/src/main/java/org/opensearch/common/inject/Binder.java +++ b/server/src/main/java/org/opensearch/common/inject/Binder.java @@ -197,6 +197,8 @@ * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) * @author kevinb@google.com (Kevin Bourrillion) + * + * @opensearch.internal */ public interface Binder { diff --git a/server/src/main/java/org/opensearch/common/inject/Binding.java b/server/src/main/java/org/opensearch/common/inject/Binding.java index d40aec8a25d6d..53d02e37502af 100644 --- a/server/src/main/java/org/opensearch/common/inject/Binding.java +++ b/server/src/main/java/org/opensearch/common/inject/Binding.java @@ -68,6 +68,8 @@ * @param the bound type. The injected is always assignable to this type. * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public interface Binding extends Element { diff --git a/server/src/main/java/org/opensearch/common/inject/BindingAnnotation.java b/server/src/main/java/org/opensearch/common/inject/BindingAnnotation.java index 183ee13db162d..430b204c3e640 100644 --- a/server/src/main/java/org/opensearch/common/inject/BindingAnnotation.java +++ b/server/src/main/java/org/opensearch/common/inject/BindingAnnotation.java @@ -47,6 +47,8 @@ * * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Target(ANNOTATION_TYPE) @Retention(RUNTIME) 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 2635ead8d7f51..1dd3c83b1474e 100644 --- a/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/BindingProcessor.java @@ -67,6 +67,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class BindingProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/BoundProviderFactory.java b/server/src/main/java/org/opensearch/common/inject/BoundProviderFactory.java index ba73fbb0848f7..687da29eb27d3 100644 --- a/server/src/main/java/org/opensearch/common/inject/BoundProviderFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/BoundProviderFactory.java @@ -38,6 +38,8 @@ /** * Delegates to a custom factory which is also bound in the injector. + * + * @opensearch.internal */ class BoundProviderFactory implements InternalFactory, CreationListener { diff --git a/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java b/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java index b62fe8f753505..4379a93482560 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java +++ b/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java @@ -45,6 +45,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class ConfigurationException extends RuntimeException { private final Set messages; diff --git a/server/src/main/java/org/opensearch/common/inject/ConstantFactory.java b/server/src/main/java/org/opensearch/common/inject/ConstantFactory.java index 2b1c6aa258226..935448d811532 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstantFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstantFactory.java @@ -37,7 +37,11 @@ import org.opensearch.common.inject.spi.Dependency; /** + * Constant factory. + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ class ConstantFactory implements InternalFactory { diff --git a/server/src/main/java/org/opensearch/common/inject/ConstructionProxy.java b/server/src/main/java/org/opensearch/common/inject/ConstructionProxy.java index 6a8ca2ac820f9..7d30e3307d500 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstructionProxy.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstructionProxy.java @@ -39,6 +39,8 @@ * {@code T}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ interface ConstructionProxy { diff --git a/server/src/main/java/org/opensearch/common/inject/ConstructionProxyFactory.java b/server/src/main/java/org/opensearch/common/inject/ConstructionProxyFactory.java index f84f7c03a2caf..5b1a3f453d2f0 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstructionProxyFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstructionProxyFactory.java @@ -33,6 +33,8 @@ * Creates {@link ConstructionProxy} instances. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ interface ConstructionProxyFactory { diff --git a/server/src/main/java/org/opensearch/common/inject/ConstructorBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/ConstructorBindingImpl.java index 5f8458e76d349..8027ff74a4e21 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstructorBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstructorBindingImpl.java @@ -44,6 +44,11 @@ import java.util.HashSet; import java.util.Set; +/** + * Constructor binding implementation + * + * @opensearch.internal + */ class ConstructorBindingImpl extends BindingImpl implements ConstructorBinding { private final Factory factory; @@ -115,6 +120,11 @@ public String toString() { .toString(); } + /** + * Factory to build a binding object + * + * @opensearch.internal + */ private static class Factory implements InternalFactory { private ConstructorInjector constructorInjector; diff --git a/server/src/main/java/org/opensearch/common/inject/ConstructorInjector.java b/server/src/main/java/org/opensearch/common/inject/ConstructorInjector.java index a83eed858fb0b..ff8806d1fda98 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstructorInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstructorInjector.java @@ -43,6 +43,8 @@ * methods are injected. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ class ConstructorInjector { diff --git a/server/src/main/java/org/opensearch/common/inject/ConstructorInjectorStore.java b/server/src/main/java/org/opensearch/common/inject/ConstructorInjectorStore.java index d06896c2b4243..220de16201cf7 100644 --- a/server/src/main/java/org/opensearch/common/inject/ConstructorInjectorStore.java +++ b/server/src/main/java/org/opensearch/common/inject/ConstructorInjectorStore.java @@ -38,6 +38,8 @@ * Constructor injectors by type. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class ConstructorInjectorStore { private final InjectorImpl injector; diff --git a/server/src/main/java/org/opensearch/common/inject/ContextualCallable.java b/server/src/main/java/org/opensearch/common/inject/ContextualCallable.java index 0e8404898aad2..22afccdaf12c0 100644 --- a/server/src/main/java/org/opensearch/common/inject/ContextualCallable.java +++ b/server/src/main/java/org/opensearch/common/inject/ContextualCallable.java @@ -33,7 +33,11 @@ import org.opensearch.common.inject.internal.InternalContext; /** + * Contextual callable + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ interface ContextualCallable { T call(InternalContext context) throws ErrorsException; diff --git a/server/src/main/java/org/opensearch/common/inject/CreationException.java b/server/src/main/java/org/opensearch/common/inject/CreationException.java index 9ab1c882e9d51..8b2271ba3630e 100644 --- a/server/src/main/java/org/opensearch/common/inject/CreationException.java +++ b/server/src/main/java/org/opensearch/common/inject/CreationException.java @@ -39,6 +39,8 @@ * errors. Clients should catch this exception, log it, and stop execution. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class CreationException extends RuntimeException { private final Collection messages; diff --git a/server/src/main/java/org/opensearch/common/inject/DefaultConstructionProxyFactory.java b/server/src/main/java/org/opensearch/common/inject/DefaultConstructionProxyFactory.java index cdc6bf36034df..146398714b78d 100644 --- a/server/src/main/java/org/opensearch/common/inject/DefaultConstructionProxyFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/DefaultConstructionProxyFactory.java @@ -38,6 +38,8 @@ * Produces construction proxies that invoke the class constructor. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ class DefaultConstructionProxyFactory implements ConstructionProxyFactory { diff --git a/server/src/main/java/org/opensearch/common/inject/DeferredLookups.java b/server/src/main/java/org/opensearch/common/inject/DeferredLookups.java index 20a437e0a80a3..9004cba954bce 100644 --- a/server/src/main/java/org/opensearch/common/inject/DeferredLookups.java +++ b/server/src/main/java/org/opensearch/common/inject/DeferredLookups.java @@ -42,6 +42,8 @@ * creation it's necessary to {@link #initialize initialize} these lookups. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class DeferredLookups implements Lookups { private final InjectorImpl injector; diff --git a/server/src/main/java/org/opensearch/common/inject/EncounterImpl.java b/server/src/main/java/org/opensearch/common/inject/EncounterImpl.java index 296a176ab83bc..39b9574b62ba3 100644 --- a/server/src/main/java/org/opensearch/common/inject/EncounterImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/EncounterImpl.java @@ -39,7 +39,11 @@ import java.util.List; /** + * Encounter implementation + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ final class EncounterImpl implements TypeEncounter { diff --git a/server/src/main/java/org/opensearch/common/inject/Exposed.java b/server/src/main/java/org/opensearch/common/inject/Exposed.java index 65f7f3037714c..204d74ca096b7 100644 --- a/server/src/main/java/org/opensearch/common/inject/Exposed.java +++ b/server/src/main/java/org/opensearch/common/inject/Exposed.java @@ -42,6 +42,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ @Target(ElementType.METHOD) @Retention(RUNTIME) diff --git a/server/src/main/java/org/opensearch/common/inject/ExposedKeyFactory.java b/server/src/main/java/org/opensearch/common/inject/ExposedKeyFactory.java index 3983984470c18..9a07bcf1adc00 100644 --- a/server/src/main/java/org/opensearch/common/inject/ExposedKeyFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/ExposedKeyFactory.java @@ -40,6 +40,8 @@ /** * This factory exists in a parent injector. When invoked, it retrieves its value from a child * injector. + * + * @opensearch.internal */ class ExposedKeyFactory implements InternalFactory, BindingProcessor.CreationListener { private final Key key; diff --git a/server/src/main/java/org/opensearch/common/inject/FactoryProxy.java b/server/src/main/java/org/opensearch/common/inject/FactoryProxy.java index 97146198e4b95..ffb1873efc1bb 100644 --- a/server/src/main/java/org/opensearch/common/inject/FactoryProxy.java +++ b/server/src/main/java/org/opensearch/common/inject/FactoryProxy.java @@ -38,6 +38,8 @@ /** * A placeholder which enables us to swap in the real factory once the injector is created. + * + * @opensearch.internal */ class FactoryProxy implements InternalFactory, BindingProcessor.CreationListener { diff --git a/server/src/main/java/org/opensearch/common/inject/Guice.java b/server/src/main/java/org/opensearch/common/inject/Guice.java index 1ffdd5267fd6e..6513f720bea98 100644 --- a/server/src/main/java/org/opensearch/common/inject/Guice.java +++ b/server/src/main/java/org/opensearch/common/inject/Guice.java @@ -57,6 +57,8 @@ * } * } * + * + * @opensearch.internal */ public final class Guice { diff --git a/server/src/main/java/org/opensearch/common/inject/ImplementedBy.java b/server/src/main/java/org/opensearch/common/inject/ImplementedBy.java index 05df90d9dba78..1d0fec8033f62 100644 --- a/server/src/main/java/org/opensearch/common/inject/ImplementedBy.java +++ b/server/src/main/java/org/opensearch/common/inject/ImplementedBy.java @@ -39,6 +39,8 @@ * A pointer to the default implementation of a type. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Retention(RUNTIME) @Target(TYPE) diff --git a/server/src/main/java/org/opensearch/common/inject/InheritingState.java b/server/src/main/java/org/opensearch/common/inject/InheritingState.java index a25017ab9a2c0..dc31de4e20084 100644 --- a/server/src/main/java/org/opensearch/common/inject/InheritingState.java +++ b/server/src/main/java/org/opensearch/common/inject/InheritingState.java @@ -49,7 +49,11 @@ import static java.util.Collections.emptySet; /** + * Inheriting state. + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class InheritingState implements State { diff --git a/server/src/main/java/org/opensearch/common/inject/Initializable.java b/server/src/main/java/org/opensearch/common/inject/Initializable.java index 779d50bbfcea0..9dbc26645fad1 100644 --- a/server/src/main/java/org/opensearch/common/inject/Initializable.java +++ b/server/src/main/java/org/opensearch/common/inject/Initializable.java @@ -36,6 +36,8 @@ * Holds a reference that requires initialization to be performed before it can be used. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ interface Initializable { diff --git a/server/src/main/java/org/opensearch/common/inject/Initializables.java b/server/src/main/java/org/opensearch/common/inject/Initializables.java index 4ace6a059c847..6d1d5b88e4306 100644 --- a/server/src/main/java/org/opensearch/common/inject/Initializables.java +++ b/server/src/main/java/org/opensearch/common/inject/Initializables.java @@ -33,7 +33,11 @@ import org.opensearch.common.inject.internal.ErrorsException; /** + * Initializables. + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class Initializables { diff --git a/server/src/main/java/org/opensearch/common/inject/Initializer.java b/server/src/main/java/org/opensearch/common/inject/Initializer.java index 8b333f7ac29ed..e806eba6df707 100644 --- a/server/src/main/java/org/opensearch/common/inject/Initializer.java +++ b/server/src/main/java/org/opensearch/common/inject/Initializer.java @@ -46,6 +46,8 @@ * {@link Initializable}, which attempts to perform injection before use. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class Initializer { /** diff --git a/server/src/main/java/org/opensearch/common/inject/Inject.java b/server/src/main/java/org/opensearch/common/inject/Inject.java index 658d5dcd1ae7c..0c58238459d42 100644 --- a/server/src/main/java/org/opensearch/common/inject/Inject.java +++ b/server/src/main/java/org/opensearch/common/inject/Inject.java @@ -60,6 +60,8 @@ * specifier (private, default, protected, public). * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Target({ METHOD, CONSTRUCTOR, FIELD }) @Retention(RUNTIME) diff --git a/server/src/main/java/org/opensearch/common/inject/InjectionRequestProcessor.java b/server/src/main/java/org/opensearch/common/inject/InjectionRequestProcessor.java index 63740859ba0d5..062e1bb1257f1 100644 --- a/server/src/main/java/org/opensearch/common/inject/InjectionRequestProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/InjectionRequestProcessor.java @@ -46,6 +46,8 @@ * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) * @author mikeward@google.com (Mike Ward) + * + * @opensearch.internal */ class InjectionRequestProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/Injector.java b/server/src/main/java/org/opensearch/common/inject/Injector.java index adf8a6c742f67..ff212c6313371 100644 --- a/server/src/main/java/org/opensearch/common/inject/Injector.java +++ b/server/src/main/java/org/opensearch/common/inject/Injector.java @@ -53,6 +53,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public interface Injector { diff --git a/server/src/main/java/org/opensearch/common/inject/InjectorBuilder.java b/server/src/main/java/org/opensearch/common/inject/InjectorBuilder.java index 944ff64d508ac..3dd858356ba16 100644 --- a/server/src/main/java/org/opensearch/common/inject/InjectorBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/InjectorBuilder.java @@ -56,6 +56,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class InjectorBuilder { 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 439ce8fbae33b..c01f155c399e4 100644 --- a/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/InjectorImpl.java @@ -72,6 +72,8 @@ * * @author crazybob@google.com (Bob Lee) * @see InjectorBuilder + * + * @opensearch.internal */ class InjectorImpl implements Injector, Lookups { final State state; @@ -199,6 +201,11 @@ private BindingImpl> createProviderBinding(Key> key, return new ProviderBindingImpl<>(this, key, delegate); } + /** + * Implementation for a binding object + * + * @opensearch.internal + */ static class ProviderBindingImpl extends BindingImpl> implements ProviderBinding> { final BindingImpl providedBinding; @@ -286,6 +293,11 @@ private BindingImpl convertConstantStringBinding(Key key, Errors error } } + /** + * Implementation for a converted constant + * + * @opensearch.internal + */ private static class ConvertedConstantBindingImpl extends BindingImpl implements ConvertedConstantBinding { final T value; final Provider provider; @@ -607,6 +619,11 @@ InternalFactory getInternalFactory(Key key, Errors errors) t return getBindingOrThrow(key, errors).getInternalFactory(); } + /** + * Multimap for java bindings + * + * @opensearch.internal + */ private static class BindingsMultimap { final Map, List>> multimap = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/common/inject/InjectorShell.java b/server/src/main/java/org/opensearch/common/inject/InjectorShell.java index 0af8aa5a895a0..006d39b6d8348 100644 --- a/server/src/main/java/org/opensearch/common/inject/InjectorShell.java +++ b/server/src/main/java/org/opensearch/common/inject/InjectorShell.java @@ -58,6 +58,8 @@ * of injectors in batch. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class InjectorShell { @@ -77,6 +79,11 @@ List getElements() { return elements; } + /** + * Builder for an injector + * + * @opensearch.internal + */ static class Builder { private final List elements = new ArrayList<>(); private final List modules = new ArrayList<>(); @@ -215,6 +222,11 @@ private static void bindInjector(InjectorImpl injector) { ); } + /** + * The factory for the injector + * + * @opensearch.internal + */ private static class InjectorFactory implements InternalFactory, Provider { private final Injector injector; @@ -259,6 +271,11 @@ private static void bindLogger(InjectorImpl injector) { ); } + /** + * Factory for a logger + * + * @opensearch.internal + */ private static class LoggerFactory implements InternalFactory, Provider { @Override public Logger get(Errors errors, InternalContext context, Dependency dependency) { @@ -279,6 +296,11 @@ public String toString() { } } + /** + * The root module + * + * @opensearch.internal + */ private static class RootModule implements Module { final Stage stage; diff --git a/server/src/main/java/org/opensearch/common/inject/InternalFactoryToProviderAdapter.java b/server/src/main/java/org/opensearch/common/inject/InternalFactoryToProviderAdapter.java index 3eb40b8d567a0..9925418c34a30 100644 --- a/server/src/main/java/org/opensearch/common/inject/InternalFactoryToProviderAdapter.java +++ b/server/src/main/java/org/opensearch/common/inject/InternalFactoryToProviderAdapter.java @@ -39,7 +39,11 @@ import java.util.Objects; /** + * Adapats internal factory to a provider + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ class InternalFactoryToProviderAdapter implements InternalFactory { 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 d36791c154450..56730cbfa495a 100644 --- a/server/src/main/java/org/opensearch/common/inject/Key.java +++ b/server/src/main/java/org/opensearch/common/inject/Key.java @@ -58,6 +58,8 @@ * types will be replaced with their wrapper types when keys are created. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Key { @@ -411,6 +413,11 @@ public String toString() { } } + /** + * Strategy for an annotation + * + * @opensearch.internal + */ // this class not test-covered static class AnnotationInstanceStrategy implements AnnotationStrategy { @@ -461,6 +468,11 @@ public String toString() { } } + /** + * Type of annotation + * + * @opensearch.internal + */ static class AnnotationTypeStrategy implements AnnotationStrategy { final Class annotationType; diff --git a/server/src/main/java/org/opensearch/common/inject/LookupProcessor.java b/server/src/main/java/org/opensearch/common/inject/LookupProcessor.java index 153dad9ce0cf8..c9d1546ca9e92 100644 --- a/server/src/main/java/org/opensearch/common/inject/LookupProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/LookupProcessor.java @@ -39,6 +39,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class LookupProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/Lookups.java b/server/src/main/java/org/opensearch/common/inject/Lookups.java index 798a665cdb3d0..241bae072217a 100644 --- a/server/src/main/java/org/opensearch/common/inject/Lookups.java +++ b/server/src/main/java/org/opensearch/common/inject/Lookups.java @@ -34,6 +34,8 @@ * the injector has been created. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ interface Lookups { diff --git a/server/src/main/java/org/opensearch/common/inject/MembersInjector.java b/server/src/main/java/org/opensearch/common/inject/MembersInjector.java index 132616ac35a08..891762375d5a2 100644 --- a/server/src/main/java/org/opensearch/common/inject/MembersInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/MembersInjector.java @@ -37,6 +37,8 @@ * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface MembersInjector { diff --git a/server/src/main/java/org/opensearch/common/inject/MembersInjectorImpl.java b/server/src/main/java/org/opensearch/common/inject/MembersInjectorImpl.java index 507b21f872b0a..47eca6840b3e2 100644 --- a/server/src/main/java/org/opensearch/common/inject/MembersInjectorImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/MembersInjectorImpl.java @@ -45,6 +45,8 @@ * Injects members of instances of a given type. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class MembersInjectorImpl implements MembersInjector { private final TypeLiteral typeLiteral; diff --git a/server/src/main/java/org/opensearch/common/inject/MembersInjectorStore.java b/server/src/main/java/org/opensearch/common/inject/MembersInjectorStore.java index 207803abe6df7..c63460d1a9a96 100644 --- a/server/src/main/java/org/opensearch/common/inject/MembersInjectorStore.java +++ b/server/src/main/java/org/opensearch/common/inject/MembersInjectorStore.java @@ -45,6 +45,8 @@ * Members injectors by type. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class MembersInjectorStore { private final InjectorImpl injector; diff --git a/server/src/main/java/org/opensearch/common/inject/MessageProcessor.java b/server/src/main/java/org/opensearch/common/inject/MessageProcessor.java index e2f06cfeaf144..f81babc803019 100644 --- a/server/src/main/java/org/opensearch/common/inject/MessageProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/MessageProcessor.java @@ -37,6 +37,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class MessageProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/Module.java b/server/src/main/java/org/opensearch/common/inject/Module.java index 49a12714c8de4..b1fc031192ea0 100644 --- a/server/src/main/java/org/opensearch/common/inject/Module.java +++ b/server/src/main/java/org/opensearch/common/inject/Module.java @@ -42,6 +42,8 @@ * will be created for all methods annotated with {@literal @}{@link Provides}. * Use scope and binding annotations on these methods to configure the * bindings. + * + * @opensearch.internal */ public interface Module { diff --git a/server/src/main/java/org/opensearch/common/inject/ModulesBuilder.java b/server/src/main/java/org/opensearch/common/inject/ModulesBuilder.java index 0ad304ad90d5c..55fc263ffc574 100644 --- a/server/src/main/java/org/opensearch/common/inject/ModulesBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/ModulesBuilder.java @@ -37,6 +37,11 @@ import java.util.Iterator; import java.util.List; +/** + * A modules builder + * + * @opensearch.internal + */ public class ModulesBuilder implements Iterable { private final List modules = new ArrayList<>(); diff --git a/server/src/main/java/org/opensearch/common/inject/OutOfScopeException.java b/server/src/main/java/org/opensearch/common/inject/OutOfScopeException.java index ed222d014fbc2..bf1d25498fb90 100644 --- a/server/src/main/java/org/opensearch/common/inject/OutOfScopeException.java +++ b/server/src/main/java/org/opensearch/common/inject/OutOfScopeException.java @@ -35,6 +35,8 @@ * * @author kevinb@google.com (Kevin Bourrillion) * @since 2.0 + * + * @opensearch.internal */ public final class OutOfScopeException extends RuntimeException { diff --git a/server/src/main/java/org/opensearch/common/inject/PreProcessModule.java b/server/src/main/java/org/opensearch/common/inject/PreProcessModule.java index 48778fd78292a..e34e564d8e253 100644 --- a/server/src/main/java/org/opensearch/common/inject/PreProcessModule.java +++ b/server/src/main/java/org/opensearch/common/inject/PreProcessModule.java @@ -36,7 +36,7 @@ * A module can implement this interface to allow to pre process other modules * before an injector is created. * - * + * @opensearch.internal */ public interface PreProcessModule { diff --git a/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java b/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java index 22e334a52c9b7..87635880e29d8 100644 --- a/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java +++ b/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java @@ -37,6 +37,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface PrivateBinder extends Binder { diff --git a/server/src/main/java/org/opensearch/common/inject/PrivateElementProcessor.java b/server/src/main/java/org/opensearch/common/inject/PrivateElementProcessor.java index 103fb2f9049dd..b1a97b8defcd9 100644 --- a/server/src/main/java/org/opensearch/common/inject/PrivateElementProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/PrivateElementProcessor.java @@ -39,6 +39,8 @@ * Handles {@link Binder#newPrivateBinder()} elements. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class PrivateElementProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/PrivateModule.java b/server/src/main/java/org/opensearch/common/inject/PrivateModule.java index df47d5eb261f3..09c02c944c316 100644 --- a/server/src/main/java/org/opensearch/common/inject/PrivateModule.java +++ b/server/src/main/java/org/opensearch/common/inject/PrivateModule.java @@ -83,6 +83,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public abstract class PrivateModule implements Module { diff --git a/server/src/main/java/org/opensearch/common/inject/ProvidedBy.java b/server/src/main/java/org/opensearch/common/inject/ProvidedBy.java index 4a8c9dece954f..b6879a9ea3dc0 100644 --- a/server/src/main/java/org/opensearch/common/inject/ProvidedBy.java +++ b/server/src/main/java/org/opensearch/common/inject/ProvidedBy.java @@ -39,6 +39,8 @@ * A pointer to the default provider type for a type. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Retention(RUNTIME) @Target(TYPE) diff --git a/server/src/main/java/org/opensearch/common/inject/Provider.java b/server/src/main/java/org/opensearch/common/inject/Provider.java index 96c08d1f943fc..97f9e9ae503cd 100644 --- a/server/src/main/java/org/opensearch/common/inject/Provider.java +++ b/server/src/main/java/org/opensearch/common/inject/Provider.java @@ -49,6 +49,8 @@ * * @param the type of object this provides * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface Provider { diff --git a/server/src/main/java/org/opensearch/common/inject/ProviderToInternalFactoryAdapter.java b/server/src/main/java/org/opensearch/common/inject/ProviderToInternalFactoryAdapter.java index f67b601ca8662..c90d4dcf7469d 100644 --- a/server/src/main/java/org/opensearch/common/inject/ProviderToInternalFactoryAdapter.java +++ b/server/src/main/java/org/opensearch/common/inject/ProviderToInternalFactoryAdapter.java @@ -36,7 +36,11 @@ import org.opensearch.common.inject.spi.Dependency; /** + * Adapts a provider to an internal factory. + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ class ProviderToInternalFactoryAdapter implements Provider { diff --git a/server/src/main/java/org/opensearch/common/inject/Provides.java b/server/src/main/java/org/opensearch/common/inject/Provides.java index 694816b971692..5620b30774af5 100644 --- a/server/src/main/java/org/opensearch/common/inject/Provides.java +++ b/server/src/main/java/org/opensearch/common/inject/Provides.java @@ -42,6 +42,8 @@ * * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ @Documented @Target(METHOD) diff --git a/server/src/main/java/org/opensearch/common/inject/ProvisionException.java b/server/src/main/java/org/opensearch/common/inject/ProvisionException.java index 122777f550c7a..452e7982ddca4 100644 --- a/server/src/main/java/org/opensearch/common/inject/ProvisionException.java +++ b/server/src/main/java/org/opensearch/common/inject/ProvisionException.java @@ -46,6 +46,8 @@ * @author kevinb@google.com (Kevin Bourrillion) * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class ProvisionException extends RuntimeException { private final Set messages; diff --git a/server/src/main/java/org/opensearch/common/inject/Reflection.java b/server/src/main/java/org/opensearch/common/inject/Reflection.java index f835b3ea41d8e..296ac9a63a1de 100644 --- a/server/src/main/java/org/opensearch/common/inject/Reflection.java +++ b/server/src/main/java/org/opensearch/common/inject/Reflection.java @@ -43,6 +43,8 @@ class Reflection { /** * A placeholder. This enables us to continue processing and gather more * errors but blows up if you actually try to use it. + * + * @opensearch.internal */ static class InvalidConstructor { InvalidConstructor() { diff --git a/server/src/main/java/org/opensearch/common/inject/Scope.java b/server/src/main/java/org/opensearch/common/inject/Scope.java index 97017e997aeba..a21495f522d5e 100644 --- a/server/src/main/java/org/opensearch/common/inject/Scope.java +++ b/server/src/main/java/org/opensearch/common/inject/Scope.java @@ -41,6 +41,8 @@ * An example of a scope is {@link Scopes#SINGLETON}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface Scope { diff --git a/server/src/main/java/org/opensearch/common/inject/ScopeAnnotation.java b/server/src/main/java/org/opensearch/common/inject/ScopeAnnotation.java index 88ed59025553b..5617112fb30c4 100644 --- a/server/src/main/java/org/opensearch/common/inject/ScopeAnnotation.java +++ b/server/src/main/java/org/opensearch/common/inject/ScopeAnnotation.java @@ -47,6 +47,8 @@ * * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Target(ANNOTATION_TYPE) @Retention(RUNTIME) diff --git a/server/src/main/java/org/opensearch/common/inject/ScopeBindingProcessor.java b/server/src/main/java/org/opensearch/common/inject/ScopeBindingProcessor.java index 77a5f92074673..f36172ecd1779 100644 --- a/server/src/main/java/org/opensearch/common/inject/ScopeBindingProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/ScopeBindingProcessor.java @@ -41,6 +41,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class ScopeBindingProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/Scopes.java b/server/src/main/java/org/opensearch/common/inject/Scopes.java index a3821fdc7fa67..557455b31b02d 100644 --- a/server/src/main/java/org/opensearch/common/inject/Scopes.java +++ b/server/src/main/java/org/opensearch/common/inject/Scopes.java @@ -40,6 +40,8 @@ * Built-in scope implementations. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Scopes { diff --git a/server/src/main/java/org/opensearch/common/inject/SingleFieldInjector.java b/server/src/main/java/org/opensearch/common/inject/SingleFieldInjector.java index 8a6e1e446fca0..3d02213c743c1 100644 --- a/server/src/main/java/org/opensearch/common/inject/SingleFieldInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/SingleFieldInjector.java @@ -40,6 +40,8 @@ /** * Sets an injectable field. + * + * @opensearch.internal */ class SingleFieldInjector implements SingleMemberInjector { final Field field; diff --git a/server/src/main/java/org/opensearch/common/inject/SingleMemberInjector.java b/server/src/main/java/org/opensearch/common/inject/SingleMemberInjector.java index 009fbcfb1128f..d26ed98ef91f8 100644 --- a/server/src/main/java/org/opensearch/common/inject/SingleMemberInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/SingleMemberInjector.java @@ -35,6 +35,8 @@ /** * Injects a field or method of a given object. + * + * @opensearch.internal */ interface SingleMemberInjector { void inject(Errors errors, InternalContext context, Object o); diff --git a/server/src/main/java/org/opensearch/common/inject/SingleMethodInjector.java b/server/src/main/java/org/opensearch/common/inject/SingleMethodInjector.java index 6ca2b1b367f1a..600b953964010 100644 --- a/server/src/main/java/org/opensearch/common/inject/SingleMethodInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/SingleMethodInjector.java @@ -41,6 +41,8 @@ /** * Invokes an injectable method. + * + * @opensearch.internal */ class SingleMethodInjector implements SingleMemberInjector { final MethodInvoker methodInvoker; diff --git a/server/src/main/java/org/opensearch/common/inject/SingleParameterInjector.java b/server/src/main/java/org/opensearch/common/inject/SingleParameterInjector.java index 7fa6cd1d5df18..cc6636d35c670 100644 --- a/server/src/main/java/org/opensearch/common/inject/SingleParameterInjector.java +++ b/server/src/main/java/org/opensearch/common/inject/SingleParameterInjector.java @@ -37,6 +37,8 @@ /** * Resolves a single parameter, to be used in a constructor or method invocation. + * + * @opensearch.internal */ class SingleParameterInjector { private static final Object[] NO_ARGUMENTS = {}; diff --git a/server/src/main/java/org/opensearch/common/inject/Singleton.java b/server/src/main/java/org/opensearch/common/inject/Singleton.java index d3d894e2d6cfe..29c743ae47e82 100644 --- a/server/src/main/java/org/opensearch/common/inject/Singleton.java +++ b/server/src/main/java/org/opensearch/common/inject/Singleton.java @@ -40,6 +40,8 @@ * (per {@link Injector}) to be reused for all injections for that binding. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RUNTIME) diff --git a/server/src/main/java/org/opensearch/common/inject/Stage.java b/server/src/main/java/org/opensearch/common/inject/Stage.java index befb6409d7457..d5996bd1363e9 100644 --- a/server/src/main/java/org/opensearch/common/inject/Stage.java +++ b/server/src/main/java/org/opensearch/common/inject/Stage.java @@ -33,6 +33,8 @@ * The stage we're running in. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public enum Stage { diff --git a/server/src/main/java/org/opensearch/common/inject/State.java b/server/src/main/java/org/opensearch/common/inject/State.java index 560824c065793..3d90737f40dc2 100644 --- a/server/src/main/java/org/opensearch/common/inject/State.java +++ b/server/src/main/java/org/opensearch/common/inject/State.java @@ -46,6 +46,8 @@ * injector data to be accessed as a unit. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ interface State { diff --git a/server/src/main/java/org/opensearch/common/inject/TypeConverterBindingProcessor.java b/server/src/main/java/org/opensearch/common/inject/TypeConverterBindingProcessor.java index 07b4628044904..abe8a24eead8d 100644 --- a/server/src/main/java/org/opensearch/common/inject/TypeConverterBindingProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/TypeConverterBindingProcessor.java @@ -48,6 +48,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class TypeConverterBindingProcessor extends AbstractProcessor { diff --git a/server/src/main/java/org/opensearch/common/inject/TypeListenerBindingProcessor.java b/server/src/main/java/org/opensearch/common/inject/TypeListenerBindingProcessor.java index 07916ccb1aeb4..64a47ab97cbb7 100644 --- a/server/src/main/java/org/opensearch/common/inject/TypeListenerBindingProcessor.java +++ b/server/src/main/java/org/opensearch/common/inject/TypeListenerBindingProcessor.java @@ -36,6 +36,8 @@ * Handles {@link Binder#bindListener} commands. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class TypeListenerBindingProcessor extends AbstractProcessor { 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 6fb267a911fcf..48b33d9df5f09 100644 --- a/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java +++ b/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java @@ -76,6 +76,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class TypeLiteral { diff --git a/server/src/main/java/org/opensearch/common/inject/WeakKeySet.java b/server/src/main/java/org/opensearch/common/inject/WeakKeySet.java index 7ad49a7b9759c..44e3864d991ae 100644 --- a/server/src/main/java/org/opensearch/common/inject/WeakKeySet.java +++ b/server/src/main/java/org/opensearch/common/inject/WeakKeySet.java @@ -36,6 +36,8 @@ * Minimal set that doesn't hold strong references to the contained keys. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ final class WeakKeySet { diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/Assisted.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/Assisted.java index 656260952c5d2..8379458a8c069 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/Assisted.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/Assisted.java @@ -44,6 +44,8 @@ * * @author jmourits@google.com (Jerome Mourits) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ @BindingAnnotation @Target({ FIELD, PARAMETER, METHOD }) diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedConstructor.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedConstructor.java index 663a859402a26..989eb26274101 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedConstructor.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedConstructor.java @@ -48,6 +48,8 @@ * * @author jmourits@google.com (Jerome Mourits) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class AssistedConstructor { diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedInject.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedInject.java index 4f2d9b7915175..976c148f95275 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedInject.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/AssistedInject.java @@ -49,6 +49,8 @@ * annotation. When using that annotation, parameters are matched by name and type rather than * by position. In addition, values that use the standard {@literal @Inject} constructor * annotation are eligible for method interception. + * + * @opensearch.internal */ @Target({ CONSTRUCTOR }) @Retention(RUNTIME) diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/FactoryProvider.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/FactoryProvider.java index 6f288a0c4c9a8..e7eb2fcc4727c 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/FactoryProvider.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/FactoryProvider.java @@ -134,6 +134,8 @@ * @author jmourits@google.com (Jerome Mourits) * @author jessewilson@google.com (Jesse Wilson) * @author dtm@google.com (Daniel Martin) + * + * @opensearch.internal */ public class FactoryProvider implements Provider, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/Parameter.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/Parameter.java index 8f8df0a2ac373..960fc079e6438 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/Parameter.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/Parameter.java @@ -43,6 +43,8 @@ * * @author jmourits@google.com (Jerome Mourits) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class Parameter { diff --git a/server/src/main/java/org/opensearch/common/inject/assistedinject/ParameterListKey.java b/server/src/main/java/org/opensearch/common/inject/assistedinject/ParameterListKey.java index 0f48371a89ec1..12474dfceb69b 100644 --- a/server/src/main/java/org/opensearch/common/inject/assistedinject/ParameterListKey.java +++ b/server/src/main/java/org/opensearch/common/inject/assistedinject/ParameterListKey.java @@ -42,6 +42,8 @@ * * @author jmourits@google.com (Jerome Mourits) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class ParameterListKey { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java index 0a6aacb79ab54..bcd593a8cbf7b 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java @@ -35,6 +35,8 @@ * See the EDSL examples at {@link org.opensearch.common.inject.Binder}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface AnnotatedBindingBuilder extends LinkedBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java index 11e11e3b8cf7a..42c208a2b37ea 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java @@ -35,6 +35,8 @@ * See the EDSL examples at {@link org.opensearch.common.inject.Binder}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface AnnotatedConstantBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java index b63e25b1baa42..f2d0916790b6b 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java @@ -36,6 +36,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface AnnotatedElementBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java index b03c2a937f36b..595c477d3e28b 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java @@ -31,6 +31,8 @@ /** * Binds to a constant value. + * + * @opensearch.internal */ public interface ConstantBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java index 708a2d632518f..2368fef16471c 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java @@ -37,6 +37,8 @@ * See the EDSL examples at {@link org.opensearch.common.inject.Binder}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface LinkedBindingBuilder extends ScopedBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java index cd52cd8e574e9..73dd4414f17a2 100644 --- a/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java @@ -37,6 +37,8 @@ * See the EDSL examples at {@link org.opensearch.common.inject.Binder}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface ScopedBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/AbstractBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/internal/AbstractBindingBuilder.java index a6622a3e6af7c..ba7951894b801 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/AbstractBindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/AbstractBindingBuilder.java @@ -43,6 +43,8 @@ * Bind a value or constant. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public abstract class AbstractBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Annotations.java b/server/src/main/java/org/opensearch/common/inject/internal/Annotations.java index 3b83bd9693df1..1d61acad60324 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Annotations.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Annotations.java @@ -44,6 +44,8 @@ * Annotation utilities. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Annotations { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/BindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/internal/BindingBuilder.java index d4927adafc258..9f5f0dc4a7bc6 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/BindingBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/BindingBuilder.java @@ -52,6 +52,8 @@ * Bind a non-constant key. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class BindingBuilder extends AbstractBindingBuilder implements AnnotatedBindingBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/BindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/BindingImpl.java index 0365158d02461..1004398e844d8 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/BindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/BindingImpl.java @@ -38,7 +38,11 @@ import org.opensearch.common.inject.spi.InstanceBinding; /** + * A binding implementation + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public abstract class BindingImpl implements Binding { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ConstantBindingBuilderImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/ConstantBindingBuilderImpl.java index 62108baaea324..53883e8c4b8ae 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ConstantBindingBuilderImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ConstantBindingBuilderImpl.java @@ -44,6 +44,8 @@ * Bind a constant. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public final class ConstantBindingBuilderImpl extends AbstractBindingBuilder implements diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ConstructionContext.java b/server/src/main/java/org/opensearch/common/inject/internal/ConstructionContext.java index 58988f16b1d2d..63ae0584fdee9 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ConstructionContext.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ConstructionContext.java @@ -40,6 +40,8 @@ * Context of a dependency construction. Used to manage circular references. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class ConstructionContext { @@ -105,6 +107,11 @@ public void setProxyDelegates(T delegate) { } } + /** + * An invocation handler that delegates the implementation + * + * @opensearch.internal + */ static class DelegatingInvocationHandler implements InvocationHandler { T delegate; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ErrorHandler.java b/server/src/main/java/org/opensearch/common/inject/internal/ErrorHandler.java index cf3d3eaddc528..283c8c468401b 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ErrorHandler.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ErrorHandler.java @@ -35,6 +35,8 @@ * Handles errors in the Injector. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface ErrorHandler { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Errors.java b/server/src/main/java/org/opensearch/common/inject/internal/Errors.java index 3a2a1b980c1e3..86d7ef2a2ca36 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Errors.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Errors.java @@ -77,6 +77,8 @@ * method with an errors object that includes its context. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public final class Errors { @@ -590,6 +592,11 @@ public int size() { return root.errors == null ? 0 : root.errors.size(); } + /** + * A converter + * + * @opensearch.internal + */ private abstract static class Converter { final Class type; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ErrorsException.java b/server/src/main/java/org/opensearch/common/inject/internal/ErrorsException.java index 555ec2bddbe2c..d472305ce860b 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ErrorsException.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ErrorsException.java @@ -35,6 +35,8 @@ * errors. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class ErrorsException extends Exception { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ExpirationTimer.java b/server/src/main/java/org/opensearch/common/inject/internal/ExpirationTimer.java index 0c838e0a574a4..ab9d67a6a24eb 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ExpirationTimer.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ExpirationTimer.java @@ -33,6 +33,8 @@ /** * Timer used for entry expiration in MapMaker. + * + * @opensearch.internal */ class ExpirationTimer { static Timer instance = new Timer(true); diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ExposedBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/ExposedBindingImpl.java index d70892ee92e60..18d55ce703608 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ExposedBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ExposedBindingImpl.java @@ -41,6 +41,11 @@ import static java.util.Collections.singleton; +/** + * Exposed binding implementation + * + * @opensearch.internal + */ public class ExposedBindingImpl extends BindingImpl implements ExposedBinding { private final PrivateElements privateElements; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ExposureBuilder.java b/server/src/main/java/org/opensearch/common/inject/internal/ExposureBuilder.java index 46585b02ab0f1..792c208d872d4 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ExposureBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ExposureBuilder.java @@ -38,6 +38,8 @@ /** * For private binder's expose() method. + * + * @opensearch.internal */ public class ExposureBuilder implements AnnotatedElementBuilder { private final Binder binder; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/FailableCache.java b/server/src/main/java/org/opensearch/common/inject/internal/FailableCache.java index 0c8495df8ddf2..a5d57f94cb670 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/FailableCache.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/FailableCache.java @@ -36,6 +36,8 @@ * exception is thrown on retrieval. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public abstract class FailableCache { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/InstanceBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/InstanceBindingImpl.java index 3b6741bbbcaac..22b1c8dd1cf85 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/InstanceBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/InstanceBindingImpl.java @@ -45,6 +45,11 @@ import static java.util.Collections.unmodifiableSet; +/** + * Instance binding implementation + * + * @opensearch.internal + */ public class InstanceBindingImpl extends BindingImpl implements InstanceBinding { final T instance; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/InternalContext.java b/server/src/main/java/org/opensearch/common/inject/internal/InternalContext.java index 79dc11677e043..7cde5c6a35f8d 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/InternalContext.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/InternalContext.java @@ -39,6 +39,8 @@ * dependencies. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public final class InternalContext { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/InternalFactory.java b/server/src/main/java/org/opensearch/common/inject/internal/InternalFactory.java index 8d8e919cae8af..d7b8a5a4f49ef 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/InternalFactory.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/InternalFactory.java @@ -35,6 +35,8 @@ * Creates objects which will be injected. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface InternalFactory { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/LinkedBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/LinkedBindingImpl.java index 2c03d582e53da..f81ec7517d4e3 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/LinkedBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/LinkedBindingImpl.java @@ -35,6 +35,11 @@ import org.opensearch.common.inject.spi.BindingTargetVisitor; import org.opensearch.common.inject.spi.LinkedKeyBinding; +/** + * Linked binding implementation + * + * @opensearch.internal + */ public final class LinkedBindingImpl extends BindingImpl implements LinkedKeyBinding { final Key targetKey; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/LinkedProviderBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/LinkedProviderBindingImpl.java index 80ae73cd4c223..5c8be66b21103 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/LinkedProviderBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/LinkedProviderBindingImpl.java @@ -36,6 +36,11 @@ import org.opensearch.common.inject.spi.BindingTargetVisitor; import org.opensearch.common.inject.spi.ProviderKeyBinding; +/** + * Linked provider binding implementation + * + * @opensearch.internal + */ public final class LinkedProviderBindingImpl extends BindingImpl implements ProviderKeyBinding { final Key> providerKey; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/MatcherAndConverter.java b/server/src/main/java/org/opensearch/common/inject/internal/MatcherAndConverter.java index 4d744f2634da8..53051044b2f32 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/MatcherAndConverter.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/MatcherAndConverter.java @@ -36,7 +36,11 @@ import java.util.Objects; /** + * Matches and converts + * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public final class MatcherAndConverter { 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 ce215b3867793..5ccdc0c59908e 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 @@ -57,6 +57,8 @@ * public {@code Types} API. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class MoreTypes { @@ -432,6 +434,11 @@ private static Class declaringClassOf(TypeVariable typeVariable) { return genericDeclaration instanceof Class ? (Class) genericDeclaration : null; } + /** + * Implementation for a parameterized type + * + * @opensearch.internal + */ public static class ParameterizedTypeImpl implements ParameterizedType, CompositeType { private final Type ownerType; private final Type rawType; @@ -510,6 +517,11 @@ public String toString() { } } + /** + * Implementation for a generic array + * + * @opensearch.internal + */ public static class GenericArrayTypeImpl implements GenericArrayType, CompositeType { private final Type componentType; @@ -547,6 +559,8 @@ public String toString() { * The WildcardType interface supports multiple upper bounds and multiple * lower bounds. We only support what the Java 6 language needs - at most one * bound. If a lower bound is set, the upper bound must be Object.class. + * + * @opensearch.internal */ public static class WildcardTypeImpl implements WildcardType, CompositeType { private final Type upperBound; @@ -617,6 +631,8 @@ private static void checkNotPrimitive(Type type, String use) { * We cannot serialize the built-in Java member classes, which prevents us from using Members in * our exception types. We workaround this with this serializable implementation. It includes all * of the API methods, plus everything we use for line numbers and messaging. + * + * @opensearch.internal */ public static class MemberImpl implements Member { private final Class declaringClass; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Nullability.java b/server/src/main/java/org/opensearch/common/inject/internal/Nullability.java index ecc7d5f9f5b3c..1f968adfe57ea 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Nullability.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Nullability.java @@ -43,6 +43,8 @@ * org.jetbrains.annotations.Nullable. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class Nullability { private Nullability() {} diff --git a/server/src/main/java/org/opensearch/common/inject/internal/PrivateElementsImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/PrivateElementsImpl.java index c8cd137bdf5fd..46caeeebc8cc6 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/PrivateElementsImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/PrivateElementsImpl.java @@ -48,7 +48,11 @@ import static java.util.Collections.unmodifiableMap; /** + * Private elements implementation + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public final class PrivateElementsImpl implements PrivateElements { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ProviderInstanceBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/ProviderInstanceBindingImpl.java index 96f4b0644172a..b74429fe6728e 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ProviderInstanceBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ProviderInstanceBindingImpl.java @@ -44,6 +44,11 @@ import static java.util.Collections.unmodifiableSet; +/** + * Provider instance binding + * + * @opensearch.internal + */ public final class ProviderInstanceBindingImpl extends BindingImpl implements ProviderInstanceBinding { final Provider providerInstance; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethod.java b/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethod.java index 8acbc663aca7d..5368eaee7539a 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethod.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethod.java @@ -47,6 +47,8 @@ * A provider that invokes a method and returns its result. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class ProviderMethod implements ProviderWithDependencies { private final Key key; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethodsModule.java b/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethodsModule.java index e34a338fdc41e..0ca911d4d9be4 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethodsModule.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ProviderMethodsModule.java @@ -56,6 +56,8 @@ * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public final class ProviderMethodsModule implements Module { private final Object delegate; diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Scoping.java b/server/src/main/java/org/opensearch/common/inject/internal/Scoping.java index cda8d6e41a1ff..da0601fd9145f 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Scoping.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Scoping.java @@ -43,6 +43,8 @@ * The scope's eager or laziness is also exposed. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public abstract class Scoping { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/SourceProvider.java b/server/src/main/java/org/opensearch/common/inject/internal/SourceProvider.java index 0ff1c6bef3566..e7e2afe35aa89 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/SourceProvider.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/SourceProvider.java @@ -39,6 +39,8 @@ * Provides access to the calling line of code. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class SourceProvider { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/StackTraceElements.java b/server/src/main/java/org/opensearch/common/inject/internal/StackTraceElements.java index f0335639e9b34..2c0e67351dfdd 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/StackTraceElements.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/StackTraceElements.java @@ -36,6 +36,8 @@ * Creates stack trace elements for members. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class StackTraceElements { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Stopwatch.java b/server/src/main/java/org/opensearch/common/inject/internal/Stopwatch.java index c35c4334fb609..61038306f48cc 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Stopwatch.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Stopwatch.java @@ -37,6 +37,8 @@ * Enables simple performance monitoring. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Stopwatch { private static final Logger logger = Logger.getLogger(Stopwatch.class.getName()); diff --git a/server/src/main/java/org/opensearch/common/inject/internal/Strings.java b/server/src/main/java/org/opensearch/common/inject/internal/Strings.java index 5ad1e96c319c4..97004ce6dd3ac 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/Strings.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/Strings.java @@ -33,6 +33,8 @@ * String utilities. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Strings { private Strings() {} diff --git a/server/src/main/java/org/opensearch/common/inject/internal/ToStringBuilder.java b/server/src/main/java/org/opensearch/common/inject/internal/ToStringBuilder.java index 2953f2430df95..d9af76322297c 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/ToStringBuilder.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/ToStringBuilder.java @@ -36,6 +36,8 @@ * Helps with {@code toString()} methods. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class ToStringBuilder { diff --git a/server/src/main/java/org/opensearch/common/inject/internal/UniqueAnnotations.java b/server/src/main/java/org/opensearch/common/inject/internal/UniqueAnnotations.java index 6b5e859258c15..3c037f7cd552a 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/UniqueAnnotations.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/UniqueAnnotations.java @@ -38,7 +38,11 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Unique annotations. + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class UniqueAnnotations { private UniqueAnnotations() {} diff --git a/server/src/main/java/org/opensearch/common/inject/internal/UntargettedBindingImpl.java b/server/src/main/java/org/opensearch/common/inject/internal/UntargettedBindingImpl.java index 9e2c148ec79ce..a4a472a061fee 100644 --- a/server/src/main/java/org/opensearch/common/inject/internal/UntargettedBindingImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/internal/UntargettedBindingImpl.java @@ -36,6 +36,11 @@ import org.opensearch.common.inject.spi.Dependency; import org.opensearch.common.inject.spi.UntargettedBinding; +/** + * An untargeted binding implementation + * + * @opensearch.internal + */ public class UntargettedBindingImpl extends BindingImpl implements UntargettedBinding { public UntargettedBindingImpl(Injector injector, Key key, Object source) { diff --git a/server/src/main/java/org/opensearch/common/inject/matcher/AbstractMatcher.java b/server/src/main/java/org/opensearch/common/inject/matcher/AbstractMatcher.java index c6c77cb62f46f..9d9c3ec490bec 100644 --- a/server/src/main/java/org/opensearch/common/inject/matcher/AbstractMatcher.java +++ b/server/src/main/java/org/opensearch/common/inject/matcher/AbstractMatcher.java @@ -33,6 +33,8 @@ * Implements {@code and()} and {@code or()}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public abstract class AbstractMatcher implements Matcher { @@ -46,6 +48,11 @@ public Matcher or(Matcher other) { return new OrMatcher<>(this, other); } + /** + * An AND matcher + * + * @opensearch.internal + */ private static class AndMatcher extends AbstractMatcher { private final Matcher a, b; @@ -75,6 +82,11 @@ public String toString() { } } + /** + * An OR matcher + * + * @opensearch.internal + */ private static class OrMatcher extends AbstractMatcher { private final Matcher a, b; diff --git a/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java b/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java index 090a8ef63fc57..21bb63cfef097 100644 --- a/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java +++ b/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java @@ -33,6 +33,8 @@ * Returns {@code true} or {@code false} for a given input. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public interface Matcher { diff --git a/server/src/main/java/org/opensearch/common/inject/matcher/Matchers.java b/server/src/main/java/org/opensearch/common/inject/matcher/Matchers.java index dd997e0168f09..e33e7f32ee5de 100644 --- a/server/src/main/java/org/opensearch/common/inject/matcher/Matchers.java +++ b/server/src/main/java/org/opensearch/common/inject/matcher/Matchers.java @@ -42,6 +42,8 @@ * Matcher implementations. Supports matching classes and methods. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Matchers { private Matchers() {} @@ -55,6 +57,11 @@ public static Matcher any() { private static final Matcher ANY = new Any(); + /** + * Matches ANY + * + * @opensearch.internal + */ private static class Any extends AbstractMatcher { @Override public boolean matches(Object o) { @@ -78,6 +85,11 @@ public static Matcher not(final Matcher p) { return new Not<>(p); } + /** + * A NOT Matcher + * + * @opensearch.internal + */ private static class Not extends AbstractMatcher { final Matcher delegate; @@ -121,6 +133,11 @@ public static Matcher annotatedWith(final Class { private final Class annotationType; @@ -158,6 +175,11 @@ public static Matcher annotatedWith(final Annotation annotatio return new AnnotatedWith(annotation); } + /** + * An annotated With matcher + * + * @opensearch.internal + */ private static class AnnotatedWith extends AbstractMatcher { private final Annotation annotation; @@ -196,6 +218,11 @@ public static Matcher subclassesOf(final Class superclass) { return new SubclassesOf(superclass); } + /** + * A subclass matcher + * + * @opensearch.internal + */ private static class SubclassesOf extends AbstractMatcher { private final Class superclass; @@ -231,6 +258,11 @@ public static Matcher only(Object value) { return new Only(value); } + /** + * ONLY matcher + * + * @opensearch.internal + */ private static class Only extends AbstractMatcher { private final Object value; @@ -266,6 +298,11 @@ public static Matcher identicalTo(final Object value) { return new IdenticalTo(value); } + /** + * Identical matcher + * + * @opensearch.internal + */ private static class IdenticalTo extends AbstractMatcher { private final Object value; @@ -302,6 +339,11 @@ public static Matcher inPackage(final Package targetPackage) { return new InPackage(targetPackage); } + /** + * In Package matcher + * + * @opensearch.internal + */ private static class InPackage extends AbstractMatcher { private final transient Package targetPackage; private final String packageName; @@ -348,6 +390,11 @@ public static Matcher inSubpackage(final String targetPackageName) { return new InSubpackage(targetPackageName); } + /** + * In Subpackage matcher + * + * @opensearch.internal + */ private static class InSubpackage extends AbstractMatcher { private final String targetPackageName; @@ -384,6 +431,11 @@ public static Matcher returns(final Matcher> returnType return new Returns(returnType); } + /** + * Returns matcher + * + * @opensearch.internal + */ private static class Returns extends AbstractMatcher { private final Matcher> returnType; diff --git a/server/src/main/java/org/opensearch/common/inject/multibindings/Element.java b/server/src/main/java/org/opensearch/common/inject/multibindings/Element.java index f1dae7da4ae1c..c0c1dc02f51be 100644 --- a/server/src/main/java/org/opensearch/common/inject/multibindings/Element.java +++ b/server/src/main/java/org/opensearch/common/inject/multibindings/Element.java @@ -41,6 +41,8 @@ * to contribute multibindings independently. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ @Retention(RUNTIME) @BindingAnnotation diff --git a/server/src/main/java/org/opensearch/common/inject/multibindings/MapBinder.java b/server/src/main/java/org/opensearch/common/inject/multibindings/MapBinder.java index 734d6da15a2ab..e8d984fce3d48 100644 --- a/server/src/main/java/org/opensearch/common/inject/multibindings/MapBinder.java +++ b/server/src/main/java/org/opensearch/common/inject/multibindings/MapBinder.java @@ -106,6 +106,8 @@ * will not). * * @author dpb@google.com (David P. Baker) + * + * @opensearch.internal */ public abstract class MapBinder { private MapBinder() {} @@ -299,6 +301,11 @@ public LinkedBindingBuilder addBinding(K key) { return binder.bind(valueKey); } + /** + * A binder provider with dependencies + * + * @opensearch.internal + */ public static class MapBinderProviderWithDependencies implements ProviderWithDependencies>> { private Map> providerMap; diff --git a/server/src/main/java/org/opensearch/common/inject/multibindings/Multibinder.java b/server/src/main/java/org/opensearch/common/inject/multibindings/Multibinder.java index 6cd9fbc46d544..09e3a0ea9842c 100644 --- a/server/src/main/java/org/opensearch/common/inject/multibindings/Multibinder.java +++ b/server/src/main/java/org/opensearch/common/inject/multibindings/Multibinder.java @@ -102,6 +102,8 @@ * set injection will fail. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public abstract class Multibinder { private Multibinder() {} diff --git a/server/src/main/java/org/opensearch/common/inject/multibindings/RealElement.java b/server/src/main/java/org/opensearch/common/inject/multibindings/RealElement.java index 7603df43c9d9a..1363103fdd21e 100644 --- a/server/src/main/java/org/opensearch/common/inject/multibindings/RealElement.java +++ b/server/src/main/java/org/opensearch/common/inject/multibindings/RealElement.java @@ -33,7 +33,11 @@ import java.util.concurrent.atomic.AtomicInteger; /** + * A real element. + * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class RealElement implements Element { private static final AtomicInteger nextUniqueId = new AtomicInteger(1); diff --git a/server/src/main/java/org/opensearch/common/inject/name/Named.java b/server/src/main/java/org/opensearch/common/inject/name/Named.java index ddc1065cdcadd..3972c2f631d58 100644 --- a/server/src/main/java/org/opensearch/common/inject/name/Named.java +++ b/server/src/main/java/org/opensearch/common/inject/name/Named.java @@ -41,6 +41,8 @@ * Annotates named things. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ @Retention(RUNTIME) @Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) diff --git a/server/src/main/java/org/opensearch/common/inject/name/NamedImpl.java b/server/src/main/java/org/opensearch/common/inject/name/NamedImpl.java index b15ffd073e270..beed8be7218ac 100644 --- a/server/src/main/java/org/opensearch/common/inject/name/NamedImpl.java +++ b/server/src/main/java/org/opensearch/common/inject/name/NamedImpl.java @@ -32,6 +32,11 @@ import java.lang.annotation.Annotation; import java.util.Objects; +/** + * A named implementation + * + * @opensearch.internal + */ class NamedImpl implements Named { private final String value; diff --git a/server/src/main/java/org/opensearch/common/inject/name/Names.java b/server/src/main/java/org/opensearch/common/inject/name/Names.java index 8de65534baffd..1de439f2cfbfd 100644 --- a/server/src/main/java/org/opensearch/common/inject/name/Names.java +++ b/server/src/main/java/org/opensearch/common/inject/name/Names.java @@ -40,6 +40,8 @@ * Utility methods for use with {@code @}{@link Named}. * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public class Names { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java index 596ec0df01063..d7c7d9d65051d 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java @@ -39,6 +39,8 @@ * @param any type to be returned by the visit method. Use {@link Void} with * {@code return null} if no return type is needed. * @since 2.0 + * + * @opensearch.internal */ public interface BindingScopingVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java index 2633245f804a8..91df812b58ac4 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java @@ -35,6 +35,8 @@ * @param any type to be returned by the visit method. Use {@link Void} with * {@code return null} if no return type is needed. * @since 2.0 + * + * @opensearch.internal */ public interface BindingTargetVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java index 22e7d763e97b5..997bf78234fd1 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java @@ -39,6 +39,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ConstructorBinding extends Binding, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java index 9b5242298ac74..e8d6b346f8596 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java @@ -40,6 +40,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ConvertedConstantBinding extends Binding, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingScopingVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingScopingVisitor.java index f4744525bedf1..8fa5610e899bb 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingScopingVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingScopingVisitor.java @@ -41,6 +41,8 @@ * {@code return null} if no return type is needed. * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public class DefaultBindingScopingVisitor implements BindingScopingVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingTargetVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingTargetVisitor.java index 9ac3413155c15..f66199736740f 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingTargetVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/DefaultBindingTargetVisitor.java @@ -39,6 +39,8 @@ * {@code return null} if no return type is needed. * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public abstract class DefaultBindingTargetVisitor implements BindingTargetVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/DefaultElementVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/DefaultElementVisitor.java index 5196fa68a88a6..01568e56242dc 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/DefaultElementVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/DefaultElementVisitor.java @@ -39,6 +39,8 @@ * {@code return null} if no return type is needed. * @author sberlin@gmail.com (Sam Berlin) * @since 2.0 + * + * @opensearch.internal */ public abstract class DefaultElementVisitor implements ElementVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java b/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java index 99158a4432067..be1336ad0f297 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java @@ -46,6 +46,8 @@ * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class Dependency { private final InjectionPoint injectionPoint; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Element.java b/server/src/main/java/org/opensearch/common/inject/spi/Element.java index 3f30a2643b48f..660aca1bd45ab 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/Element.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/Element.java @@ -42,6 +42,8 @@ * @author jessewilson@google.com (Jesse Wilson) * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ public interface Element { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java index f6cbc39d5edcf..d415560fc03c8 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java @@ -37,6 +37,8 @@ * @param any type to be returned by the visit method. Use {@link Void} with * {@code return null} if no return type is needed. * @since 2.0 + * + * @opensearch.internal */ public interface ElementVisitor { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Elements.java b/server/src/main/java/org/opensearch/common/inject/spi/Elements.java index 9ae2877e8b78d..21dcc9ba54920 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/Elements.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/Elements.java @@ -70,6 +70,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class Elements { @@ -112,6 +114,11 @@ public void configure(Binder binder) { }; } + /** + * A recording binder + * + * @opensearch.internal + */ private static class RecordingBinder implements Binder, PrivateBinder { private final Stage stage; private final Set modules; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java index 42afd5377396c..d2563bc2728cd 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java @@ -37,6 +37,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ExposedBinding extends Binding, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/HasDependencies.java b/server/src/main/java/org/opensearch/common/inject/spi/HasDependencies.java index 51141bea2a066..b142197fb7126 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/HasDependencies.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/HasDependencies.java @@ -37,6 +37,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java index aab5d65188f9a..7a760d2b84e9f 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java @@ -36,6 +36,8 @@ * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface InjectionListener { 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 36c145433c0d4..387f9ba0f3f6c 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 @@ -65,6 +65,8 @@ * * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ public final class InjectionPoint { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java index bc15e00c12089..6ce5febbb6711 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java @@ -45,6 +45,8 @@ * * @author mikeward@google.com (Mike Ward) * @since 2.0 + * + * @opensearch.internal */ public final class InjectionRequest implements Element { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java index 6db9caa209bf1..fd7c1303ed6fc 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java @@ -38,6 +38,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface InstanceBinding extends Binding, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java index 046c28f8d9340..10b270e499603 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java @@ -37,6 +37,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface LinkedKeyBinding extends Binding { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java b/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java index d85d49ae8dd36..1f652708de875 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java @@ -44,6 +44,8 @@ * * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ public final class MembersInjectorLookup implements Element { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Message.java b/server/src/main/java/org/opensearch/common/inject/spi/Message.java index b47eb787c737d..78829e82c150e 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/Message.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/Message.java @@ -49,6 +49,8 @@ * } * * @author crazybob@google.com (Bob Lee) + * + * @opensearch.internal */ public final class Message implements Element { private final String message; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java b/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java index badcc273359ea..e4d86a356cd53 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java @@ -41,6 +41,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface PrivateElements extends Element { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java index e2fa36741517c..0a63fefc0a9e9 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java @@ -39,6 +39,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ProviderBinding> extends Binding { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java index 8245f6cb65ab1..654f40e627e4b 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java @@ -40,6 +40,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ProviderInstanceBinding extends Binding, HasDependencies { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java index 92004d8d5c60e..6f1ae8f2b9a03 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java @@ -39,6 +39,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface ProviderKeyBinding extends Binding { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java index 190a8b14cf168..16060ddd3e222 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java @@ -44,9 +44,16 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class ProviderLookup implements Element { + /** + * A provider implementation + * + * @opensearch.internal + */ // NOTE: this class is not part of guice and was added so the provider lookup's key can be accessible for tests public static class ProviderImpl implements Provider { private ProviderLookup lookup; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderWithDependencies.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderWithDependencies.java index 2f5485c23c956..6c450095a310b 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderWithDependencies.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderWithDependencies.java @@ -36,5 +36,7 @@ * aren't specified in injections, this interface should be used to expose all dependencies. * * @since 2.0 + * + * @opensearch.internal */ public interface ProviderWithDependencies extends Provider, HasDependencies {} diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java index 26b611e656ed0..7a619456e06e3 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java @@ -45,6 +45,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class ScopeBinding implements Element { private final Object source; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java b/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java index 64dc3d15a505c..494e35e6c4490 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java @@ -44,6 +44,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class StaticInjectionRequest implements Element { private final Object source; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java index 3b748b3eb1be1..93a0f607ddc27 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java @@ -36,6 +36,8 @@ * * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ public interface TypeConverter { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java index 66bfa472e72a3..00b8c7c013b5a 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java @@ -44,6 +44,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class TypeConverterBinding implements Element { private final Object source; diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java index 9db116db6bedb..e06751668c0f1 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java @@ -42,6 +42,8 @@ * * @param the injectable type encountered * @since 2.0 + * + * @opensearch.internal */ @SuppressWarnings("overloads") public interface TypeEncounter { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java index 720766f2a4dc4..fd7004aa80df0 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java @@ -42,6 +42,8 @@ * binding method interceptors}. * * @since 2.0 + * + * @opensearch.internal */ public interface TypeListener { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java index 84d78698268df..505028f09232d 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java @@ -41,6 +41,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class TypeListenerBinding implements Element { diff --git a/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java index 940706aaffbe6..37e40d45cb5a9 100644 --- a/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java +++ b/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java @@ -37,5 +37,7 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public interface UntargettedBinding extends Binding {} 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 c4461b893b75a..ff2f2e7d0dac1 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 @@ -60,6 +60,8 @@ * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class Modules { private Modules() {} @@ -277,6 +279,11 @@ public Scope visitScope(Scope scope) { } } + /** + * A module writer + * + * @opensearch.internal + */ private static class ModuleWriter extends DefaultElementVisitor { protected final Binder binder; diff --git a/server/src/main/java/org/opensearch/common/inject/util/Providers.java b/server/src/main/java/org/opensearch/common/inject/util/Providers.java index d7444e9b60e73..8eb46885e2967 100644 --- a/server/src/main/java/org/opensearch/common/inject/util/Providers.java +++ b/server/src/main/java/org/opensearch/common/inject/util/Providers.java @@ -37,6 +37,8 @@ * * @author Kevin Bourrillion (kevinb9n@gmail.com) * @since 2.0 + * + * @opensearch.internal */ public final class Providers { diff --git a/server/src/main/java/org/opensearch/common/inject/util/Types.java b/server/src/main/java/org/opensearch/common/inject/util/Types.java index 01f0385602222..82f8190ebc22d 100644 --- a/server/src/main/java/org/opensearch/common/inject/util/Types.java +++ b/server/src/main/java/org/opensearch/common/inject/util/Types.java @@ -48,6 +48,8 @@ * * @author crazybob@google.com (Bob Lee) * @since 2.0 + * + * @opensearch.internal */ public final class Types { private Types() {} diff --git a/server/src/main/java/org/opensearch/common/io/Channels.java b/server/src/main/java/org/opensearch/common/io/Channels.java index 3880d4dbf19aa..29f50b117234d 100644 --- a/server/src/main/java/org/opensearch/common/io/Channels.java +++ b/server/src/main/java/org/opensearch/common/io/Channels.java @@ -40,6 +40,11 @@ import java.nio.channels.FileChannel; import java.nio.channels.WritableByteChannel; +/** + * Data channels + * + * @opensearch.internal + */ @SuppressForbidden(reason = "Channel#read") public final class Channels { diff --git a/server/src/main/java/org/opensearch/common/io/DiskIoBufferPool.java b/server/src/main/java/org/opensearch/common/io/DiskIoBufferPool.java index 73fc09f6683b4..80b5dd353703c 100644 --- a/server/src/main/java/org/opensearch/common/io/DiskIoBufferPool.java +++ b/server/src/main/java/org/opensearch/common/io/DiskIoBufferPool.java @@ -38,6 +38,11 @@ import java.nio.ByteBuffer; import java.util.Arrays; +/** + * Pool of disk io buffers + * + * @opensearch.internal + */ public class DiskIoBufferPool { public static final int BUFFER_SIZE = StrictMath.toIntExact( diff --git a/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java b/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java index e8ba699f61e7a..e65c430783013 100644 --- a/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java +++ b/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java @@ -48,6 +48,8 @@ /** * OpenSearch utils to work with {@link java.nio.file.Path} + * + * @opensearch.internal */ public final class FileSystemUtils { diff --git a/server/src/main/java/org/opensearch/common/io/Streams.java b/server/src/main/java/org/opensearch/common/io/Streams.java index 5d347e636935b..b4dab5ecb7e54 100644 --- a/server/src/main/java/org/opensearch/common/io/Streams.java +++ b/server/src/main/java/org/opensearch/common/io/Streams.java @@ -59,6 +59,8 @@ *

* Mainly for use within the framework, * but also useful for application code. + * + * @opensearch.internal */ public abstract class Streams { @@ -257,6 +259,8 @@ public static InputStream limitStream(InputStream in, long limit) { * A wrapper around a {@link BytesStream} that makes the close operation a flush. This is * needed as sometimes a stream will be closed but the bytes that the stream holds still need * to be used and the stream cannot be closed until the bytes have been consumed. + * + * @opensearch.internal */ private static class FlushOnCloseOutputStream extends BytesStream { @@ -299,6 +303,8 @@ public BytesReference bytes() { /** * A wrapper around an {@link InputStream} that limits the number of bytes that can be read from the stream. + * + * @opensearch.internal */ static class LimitedInputStream extends FilterInputStream { diff --git a/server/src/main/java/org/opensearch/common/io/UTF8StreamWriter.java b/server/src/main/java/org/opensearch/common/io/UTF8StreamWriter.java index f8f90f290358b..4c299d7c10a92 100644 --- a/server/src/main/java/org/opensearch/common/io/UTF8StreamWriter.java +++ b/server/src/main/java/org/opensearch/common/io/UTF8StreamWriter.java @@ -37,6 +37,11 @@ import java.io.OutputStream; import java.io.Writer; +/** + * UTF8 Stream Writer. + * + * @opensearch.internal + */ public final class UTF8StreamWriter extends Writer { /** diff --git a/server/src/main/java/org/opensearch/common/io/stream/ByteBufferStreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/ByteBufferStreamInput.java index 92b38e67f02c8..707b32a0c50f3 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/ByteBufferStreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/ByteBufferStreamInput.java @@ -36,6 +36,11 @@ import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; +/** + * Byte Buffer Stream Input + * + * @opensearch.internal + */ public class ByteBufferStreamInput extends StreamInput { private final ByteBuffer buffer; diff --git a/server/src/main/java/org/opensearch/common/io/stream/BytesStream.java b/server/src/main/java/org/opensearch/common/io/stream/BytesStream.java index 1a4e34d9e7e0e..d9e1b19cccae7 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/BytesStream.java +++ b/server/src/main/java/org/opensearch/common/io/stream/BytesStream.java @@ -34,6 +34,11 @@ import org.opensearch.common.bytes.BytesReference; +/** + * Base Bytes Stream. + * + * @opensearch.internal + */ public abstract class BytesStream extends StreamOutput { public abstract BytesReference bytes(); diff --git a/server/src/main/java/org/opensearch/common/io/stream/BytesStreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/BytesStreamInput.java index e593f3c89b008..1572cd1f500f4 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/BytesStreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/BytesStreamInput.java @@ -34,6 +34,8 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * @opensearch.internal */ public class BytesStreamInput extends StreamInput { private byte[] bytes; diff --git a/server/src/main/java/org/opensearch/common/io/stream/BytesStreamOutput.java b/server/src/main/java/org/opensearch/common/io/stream/BytesStreamOutput.java index 22c37ab476a73..e6aacf7d0fcea 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/BytesStreamOutput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/BytesStreamOutput.java @@ -46,6 +46,8 @@ /** * A @link {@link StreamOutput} that uses {@link BigArrays} to acquire pages of * bytes, which avoids frequent reallocation & copying of the internal data. + * + * @opensearch.internal */ public class BytesStreamOutput extends BytesStream { diff --git a/server/src/main/java/org/opensearch/common/io/stream/DataOutputStreamOutput.java b/server/src/main/java/org/opensearch/common/io/stream/DataOutputStreamOutput.java index 9fcbc39417257..e9b0b8d1f8876 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/DataOutputStreamOutput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/DataOutputStreamOutput.java @@ -36,6 +36,11 @@ import java.io.DataOutput; import java.io.IOException; +/** + * Main stream output for data output + * + * @opensearch.internal + */ public class DataOutputStreamOutput extends StreamOutput { private final DataOutput out; diff --git a/server/src/main/java/org/opensearch/common/io/stream/DelayableWriteable.java b/server/src/main/java/org/opensearch/common/io/stream/DelayableWriteable.java index a4dddaf1f172a..67cfe5f1025e6 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/DelayableWriteable.java +++ b/server/src/main/java/org/opensearch/common/io/stream/DelayableWriteable.java @@ -56,6 +56,8 @@ * to delayed expansion). When such objects are buffered for some time it may be desirable * to force their buffering in serialized format by calling * {@link #asSerialized(Reader, NamedWriteableRegistry)}. + * + * @opensearch.internal */ public abstract class DelayableWriteable implements Writeable { /** @@ -94,6 +96,11 @@ private DelayableWriteable() {} */ abstract boolean isSerialized(); + /** + * A referencing writable + * + * @opensearch.internal + */ private static class Referencing extends DelayableWriteable { private final T reference; @@ -138,6 +145,8 @@ private BytesStreamOutput writeToBuffer(Version version) throws IOException { /** * A {@link Writeable} stored in serialized form. + * + * @opensearch.internal */ public static class Serialized extends DelayableWriteable implements Accountable { private final Writeable.Reader reader; diff --git a/server/src/main/java/org/opensearch/common/io/stream/FilterStreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/FilterStreamInput.java index 7c5ebde4b5eae..5f6bbd7c16cf3 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/FilterStreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/FilterStreamInput.java @@ -39,6 +39,8 @@ /** * Wraps a {@link StreamInput} and delegates to it. To be used to add functionality to an existing stream by subclassing. + * + * @opensearch.internal */ public abstract class FilterStreamInput extends StreamInput { diff --git a/server/src/main/java/org/opensearch/common/io/stream/InputStreamStreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/InputStreamStreamInput.java index f46ecc09f6416..991fd0fc09a9d 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/InputStreamStreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/InputStreamStreamInput.java @@ -38,6 +38,11 @@ import java.io.IOException; import java.io.InputStream; +/** + * Main input stream for input data + * + * @opensearch.internal + */ public class InputStreamStreamInput extends StreamInput { private final InputStream is; diff --git a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteable.java b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteable.java index e61cb729d8463..380d764b60f9f 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteable.java +++ b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteable.java @@ -36,6 +36,8 @@ * A {@link Writeable} object identified by its name. * To be used for arbitrary serializable objects (e.g. queries); when reading them, their name tells * which specific object needs to be created. + * + * @opensearch.internal */ public interface NamedWriteable extends Writeable { diff --git a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableAwareStreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableAwareStreamInput.java index e695cbec979e5..cf537a59edbdf 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableAwareStreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableAwareStreamInput.java @@ -36,6 +36,8 @@ /** * Wraps a {@link StreamInput} and associates it with a {@link NamedWriteableRegistry} + * + * @opensearch.internal */ public class NamedWriteableAwareStreamInput extends FilterStreamInput { diff --git a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableRegistry.java b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableRegistry.java index 15de91e551a15..0240d0a0a8bb3 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableRegistry.java +++ b/server/src/main/java/org/opensearch/common/io/stream/NamedWriteableRegistry.java @@ -44,10 +44,16 @@ * * The registration is keyed by the combination of the category class of {@link NamedWriteable}, and a name unique * to that category. + * + * @opensearch.internal */ public class NamedWriteableRegistry { - /** An entry in the registry, made up of a category class and name, and a reader for that category class. */ + /** + * An entry in the registry, made up of a category class and name, and a reader for that category class. + * + * @opensearch.internal + */ public static class Entry { /** The superclass of a {@link NamedWriteable} which will be read by {@link #reader}. */ diff --git a/server/src/main/java/org/opensearch/common/io/stream/NotSerializableExceptionWrapper.java b/server/src/main/java/org/opensearch/common/io/stream/NotSerializableExceptionWrapper.java index e1e0f69aadb09..f642dd17ad688 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/NotSerializableExceptionWrapper.java +++ b/server/src/main/java/org/opensearch/common/io/stream/NotSerializableExceptionWrapper.java @@ -44,6 +44,8 @@ * This class will preserve the stacktrace as well as the suppressed exceptions of * the throwable it was created with instead of it's own. The stacktrace has no indication * of where this exception was created. + * + * @opensearch.internal */ public final class NotSerializableExceptionWrapper extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/common/io/stream/OutputStreamStreamOutput.java b/server/src/main/java/org/opensearch/common/io/stream/OutputStreamStreamOutput.java index c849ed9e523f9..44cbe13be9aa7 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/OutputStreamStreamOutput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/OutputStreamStreamOutput.java @@ -35,6 +35,11 @@ import java.io.IOException; import java.io.OutputStream; +/** + * Streaming output data + * + * @opensearch.internal + */ public class OutputStreamStreamOutput extends StreamOutput { private final OutputStream out; diff --git a/server/src/main/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutput.java b/server/src/main/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutput.java index 35d5aac182f81..0fd8640305326 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutput.java @@ -46,6 +46,8 @@ * {@link ReleasableBytesReference} returned from {@link #bytes()}, so this * stream should only be closed after the bytes have been output or copied * elsewhere. + * + * @opensearch.internal */ public class ReleasableBytesStreamOutput extends BytesStreamOutput implements Releasable { diff --git a/server/src/main/java/org/opensearch/common/io/stream/StreamInput.java b/server/src/main/java/org/opensearch/common/io/stream/StreamInput.java index fc50a4f8b08fe..4f3555fdb1852 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/StreamInput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/StreamInput.java @@ -105,6 +105,8 @@ * everywhere. That being said, this class deals primarily with {@code List}s rather than Arrays. For the most part calls should adapt to * lists, either by storing {@code List}s internally or just converting to and from a {@code List} when calling. This comment is repeated * on {@link StreamInput}. + * + * @opensearch.internal */ public abstract class StreamInput extends InputStream { diff --git a/server/src/main/java/org/opensearch/common/io/stream/StreamOutput.java b/server/src/main/java/org/opensearch/common/io/stream/StreamOutput.java index e53e24171d8b6..11a22c4edf0c1 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/StreamOutput.java +++ b/server/src/main/java/org/opensearch/common/io/stream/StreamOutput.java @@ -101,6 +101,8 @@ * everywhere. That being said, this class deals primarily with {@code List}s rather than Arrays. For the most part calls should adapt to * lists, either by storing {@code List}s internally or just converting to and from a {@code List} when calling. This comment is repeated * on {@link StreamInput}. + * + * @opensearch.internal */ public abstract class StreamOutput extends OutputStream { diff --git a/server/src/main/java/org/opensearch/common/io/stream/VersionedNamedWriteable.java b/server/src/main/java/org/opensearch/common/io/stream/VersionedNamedWriteable.java index 6ce224c8e218a..408a2dc26386e 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/VersionedNamedWriteable.java +++ b/server/src/main/java/org/opensearch/common/io/stream/VersionedNamedWriteable.java @@ -36,6 +36,8 @@ /** * A {@link NamedWriteable} that has a minimum version associated with it. + * + * @opensearch.internal */ public interface VersionedNamedWriteable extends NamedWriteable { diff --git a/server/src/main/java/org/opensearch/common/io/stream/Writeable.java b/server/src/main/java/org/opensearch/common/io/stream/Writeable.java index 253609cbaca77..5fd227db6ca83 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/Writeable.java +++ b/server/src/main/java/org/opensearch/common/io/stream/Writeable.java @@ -38,6 +38,8 @@ * Implementers can be written to a {@linkplain StreamOutput} and read from a {@linkplain StreamInput}. This allows them to be "thrown * across the wire" using OpenSearch's internal protocol. If the implementer also implements equals and hashCode then a copy made by * serializing and deserializing must be equal and have the same hashCode. It isn't required that such a copy be entirely unchanged. + * + * @opensearch.internal */ public interface Writeable { diff --git a/server/src/main/java/org/opensearch/common/joda/Joda.java b/server/src/main/java/org/opensearch/common/joda/Joda.java index f644ef43ae472..9ecb3f2236e7c 100644 --- a/server/src/main/java/org/opensearch/common/joda/Joda.java +++ b/server/src/main/java/org/opensearch/common/joda/Joda.java @@ -65,6 +65,13 @@ import java.util.Locale; import java.util.regex.Pattern; +/** + * Joda class. + * + * @deprecated + * + * @opensearch.internal + */ @Deprecated public class Joda { // Joda.forPattern could be used even before the logging is initialized. @@ -392,6 +399,11 @@ public static boolean isJodaPattern(Version version, String pattern) { return version.before(LegacyESVersion.V_7_0_0) && pattern.startsWith("8") == false; } + /** + * parses epcoch timers + * + * @opensearch.internal + */ public static class EpochTimeParser implements DateTimeParser { private static final Pattern scientificNotation = Pattern.compile("[Ee]"); @@ -458,6 +470,11 @@ private static DeprecationLogger getDeprecationLogger() { return deprecationLogger.getOrCompute(); } + /** + * Epoch timer printer + * + * @opensearch.internal + */ public static class EpochTimePrinter implements DateTimePrinter { private boolean hasMilliSecondPrecision; diff --git a/server/src/main/java/org/opensearch/common/joda/JodaDateFormatter.java b/server/src/main/java/org/opensearch/common/joda/JodaDateFormatter.java index 3b36e36624fe3..12d48a0b362ce 100644 --- a/server/src/main/java/org/opensearch/common/joda/JodaDateFormatter.java +++ b/server/src/main/java/org/opensearch/common/joda/JodaDateFormatter.java @@ -46,6 +46,11 @@ import java.util.Locale; import java.util.Objects; +/** + * Joda date formatter. + * + * @opensearch.internal + */ public class JodaDateFormatter implements DateFormatter { final String pattern; diff --git a/server/src/main/java/org/opensearch/common/joda/JodaDateMathParser.java b/server/src/main/java/org/opensearch/common/joda/JodaDateMathParser.java index 7ea576f9852c5..131c9b001f733 100644 --- a/server/src/main/java/org/opensearch/common/joda/JodaDateMathParser.java +++ b/server/src/main/java/org/opensearch/common/joda/JodaDateMathParser.java @@ -50,6 +50,8 @@ * The format of the datetime is configurable, and unix timestamps can also be used. Datemath * is appended to a datetime with the following syntax: * ||[+-/](\d+)?[yMwdhHms]. + * + * @opensearch.internal */ public class JodaDateMathParser implements DateMathParser { diff --git a/server/src/main/java/org/opensearch/common/joda/JodaDeprecationPatterns.java b/server/src/main/java/org/opensearch/common/joda/JodaDeprecationPatterns.java index cf0e2394c7805..efb6362ab63aa 100644 --- a/server/src/main/java/org/opensearch/common/joda/JodaDeprecationPatterns.java +++ b/server/src/main/java/org/opensearch/common/joda/JodaDeprecationPatterns.java @@ -42,6 +42,11 @@ import java.util.Set; import java.util.stream.Collectors; +/** + * Deprecated patters for joda date/time + * + * @opensearch.internal + */ public class JodaDeprecationPatterns { public static final String USE_NEW_FORMAT_SPECIFIERS = "Use new java.time date format specifiers."; private static Map JODA_PATTERNS_DEPRECATIONS = new LinkedHashMap<>(); diff --git a/server/src/main/java/org/opensearch/common/lease/Releasable.java b/server/src/main/java/org/opensearch/common/lease/Releasable.java index e7f854d7d10b2..4b167ff29ee71 100644 --- a/server/src/main/java/org/opensearch/common/lease/Releasable.java +++ b/server/src/main/java/org/opensearch/common/lease/Releasable.java @@ -38,6 +38,8 @@ /** * Specialization of {@link AutoCloseable} that may only throw an {@link OpenSearchException}. + * + * @opensearch.internal */ public interface Releasable extends Closeable { diff --git a/server/src/main/java/org/opensearch/common/lease/Releasables.java b/server/src/main/java/org/opensearch/common/lease/Releasables.java index bed26c6facd36..5e885d239f884 100644 --- a/server/src/main/java/org/opensearch/common/lease/Releasables.java +++ b/server/src/main/java/org/opensearch/common/lease/Releasables.java @@ -40,7 +40,11 @@ import java.util.Arrays; import java.util.concurrent.atomic.AtomicBoolean; -/** Utility methods to work with {@link Releasable}s. */ +/** + * Utility methods to work with {@link Releasable}s. + * + * @opensearch.internal + */ public enum Releasables { ; diff --git a/server/src/main/java/org/opensearch/common/logging/DeprecatedMessage.java b/server/src/main/java/org/opensearch/common/logging/DeprecatedMessage.java index bb8ded8098b88..8905fb6f391a2 100644 --- a/server/src/main/java/org/opensearch/common/logging/DeprecatedMessage.java +++ b/server/src/main/java/org/opensearch/common/logging/DeprecatedMessage.java @@ -43,6 +43,8 @@ /** * A logger message used by {@link DeprecationLogger}. * Carries x-opaque-id field if provided in the headers. Will populate the x-opaque-id field in JSON logs. + * + * @opensearch.internal */ public class DeprecatedMessage extends OpenSearchLogMessage { public static final String X_OPAQUE_ID_FIELD_NAME = "x-opaque-id"; 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 9e9715b8fa867..57e222680ce41 100644 --- a/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java +++ b/server/src/main/java/org/opensearch/common/logging/DeprecationLogger.java @@ -49,6 +49,8 @@ * uses {@link RateLimitingFilter} to prevent the same message being logged repeatedly in a short span of time. This * key is combined with the X-Opaque-Id request header value, if supplied, which allows for per-client * message limiting. + * + * @opensearch.internal */ public class DeprecationLogger { diff --git a/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java b/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java index 1914b86703640..df5a94ccd34e4 100644 --- a/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java +++ b/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java @@ -52,6 +52,8 @@ * This is a simplistic logger that adds warning messages to HTTP headers. * Use HeaderWarning.addWarning(message,params). Message will be formatted according to RFC7234. * The result will be returned as HTTP response headers. + * + * @opensearch.internal */ public class HeaderWarning { /** diff --git a/server/src/main/java/org/opensearch/common/logging/HeaderWarningAppender.java b/server/src/main/java/org/opensearch/common/logging/HeaderWarningAppender.java index 6643c03b09e54..16c3858b15761 100644 --- a/server/src/main/java/org/opensearch/common/logging/HeaderWarningAppender.java +++ b/server/src/main/java/org/opensearch/common/logging/HeaderWarningAppender.java @@ -43,6 +43,11 @@ import org.apache.logging.log4j.core.config.plugins.PluginFactory; import org.apache.logging.log4j.message.Message; +/** + * Appends warnings to the header + * + * @opensearch.internal + */ @Plugin(name = "HeaderWarningAppender", category = Core.CATEGORY_NAME, elementType = Appender.ELEMENT_TYPE) public class HeaderWarningAppender extends AbstractAppender { public HeaderWarningAppender(String name, Filter filter) { diff --git a/server/src/main/java/org/opensearch/common/logging/JsonThrowablePatternConverter.java b/server/src/main/java/org/opensearch/common/logging/JsonThrowablePatternConverter.java index ff70ba883e15a..f3ac7162e242e 100644 --- a/server/src/main/java/org/opensearch/common/logging/JsonThrowablePatternConverter.java +++ b/server/src/main/java/org/opensearch/common/logging/JsonThrowablePatternConverter.java @@ -49,6 +49,8 @@ * * Reusing @link org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter which already converts a Throwable from * LoggingEvent into a multiline string + * + * @opensearch.internal */ @Plugin(name = "JsonThrowablePatternConverter", category = PatternConverter.CATEGORY) @ConverterKeys({ "exceptionAsJson" }) diff --git a/server/src/main/java/org/opensearch/common/logging/LogConfigurator.java b/server/src/main/java/org/opensearch/common/logging/LogConfigurator.java index f75be70851a4b..facef3a0caecc 100644 --- a/server/src/main/java/org/opensearch/common/logging/LogConfigurator.java +++ b/server/src/main/java/org/opensearch/common/logging/LogConfigurator.java @@ -80,6 +80,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.StreamSupport; +/** + * Configures the logger + * + * @opensearch.internal + */ public class LogConfigurator { /* diff --git a/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java b/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java index a81e2a4fc479f..ad9981809ae3a 100644 --- a/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java +++ b/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java @@ -37,6 +37,8 @@ /** * Format string for OpenSearch log messages. + * + * @opensearch.internal */ public class LoggerMessageFormat { diff --git a/server/src/main/java/org/opensearch/common/logging/Loggers.java b/server/src/main/java/org/opensearch/common/logging/Loggers.java index 845f6f2ad1995..1273e1263c5b2 100644 --- a/server/src/main/java/org/opensearch/common/logging/Loggers.java +++ b/server/src/main/java/org/opensearch/common/logging/Loggers.java @@ -50,6 +50,8 @@ /** * A set of utilities around Logging. + * + * @opensearch.internal */ public class Loggers { diff --git a/server/src/main/java/org/opensearch/common/logging/LoggingOutputStream.java b/server/src/main/java/org/opensearch/common/logging/LoggingOutputStream.java index 64905ced94632..c1529b1875a59 100644 --- a/server/src/main/java/org/opensearch/common/logging/LoggingOutputStream.java +++ b/server/src/main/java/org/opensearch/common/logging/LoggingOutputStream.java @@ -42,6 +42,8 @@ /** * A stream whose output is sent to the configured logger, line by line. + * + * @opensearch.internal */ class LoggingOutputStream extends OutputStream { /** The starting length of the buffer */ diff --git a/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdConverter.java b/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdConverter.java index e882ccc5f59f9..a3062bca90158 100644 --- a/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdConverter.java +++ b/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdConverter.java @@ -44,6 +44,8 @@ /** * Pattern converter to format the node_and_cluster_id variable into JSON fields node.id and cluster.uuid. * Keeping those two fields together assures that they will be atomically set and become visible in logs at the same time. + * + * @opensearch.internal */ @Plugin(category = PatternConverter.CATEGORY, name = "NodeAndClusterIdConverter") @ConverterKeys({ "node_and_cluster_id" }) diff --git a/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdStateListener.java b/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdStateListener.java index 48eba12ae0e1f..18051f9ca50c4 100644 --- a/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdStateListener.java +++ b/server/src/main/java/org/opensearch/common/logging/NodeAndClusterIdStateListener.java @@ -44,6 +44,8 @@ * The {@link NodeAndClusterIdStateListener} listens to cluster state changes and ONLY when receives the first update * it sets the clusterUUID and nodeID in log4j pattern converter {@link NodeAndClusterIdConverter}. * Once the first update is received, it will automatically be de-registered from subsequent updates. + * + * @opensearch.internal */ public class NodeAndClusterIdStateListener implements ClusterStateObserver.Listener { private static final Logger logger = LogManager.getLogger(NodeAndClusterIdStateListener.class); diff --git a/server/src/main/java/org/opensearch/common/logging/NodeNamePatternConverter.java b/server/src/main/java/org/opensearch/common/logging/NodeNamePatternConverter.java index a21857d082ecf..bc25f690d4a64 100644 --- a/server/src/main/java/org/opensearch/common/logging/NodeNamePatternConverter.java +++ b/server/src/main/java/org/opensearch/common/logging/NodeNamePatternConverter.java @@ -46,6 +46,8 @@ * We can't use a system property for this because the node name system * property is only set if the node name is explicitly defined in * opensearch.yml. + * + * @opensearch.internal */ @Plugin(category = PatternConverter.CATEGORY, name = "NodeNamePatternConverter") @ConverterKeys({ "node_name" }) diff --git a/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java b/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java index 3cb4b591e2cd3..a1b014a81be64 100644 --- a/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java +++ b/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java @@ -83,6 +83,8 @@ *

* The value taken from %OpenSearchMessageField{message} has to be a simple escaped JSON value and is populated in subclasses of * OpenSearchLogMessage + * + * @opensearch.internal */ @Plugin(name = "OpenSearchJsonLayout", category = Node.CATEGORY, elementType = Layout.ELEMENT_TYPE, printObject = true) public class OpenSearchJsonLayout extends AbstractStringLayout { @@ -168,6 +170,11 @@ PatternLayout getPatternLayout() { return patternLayout; } + /** + * Builder for a json layout + * + * @opensearch.internal + */ public static class Builder> extends AbstractStringLayout.Builder implements org.apache.logging.log4j.core.util.Builder { diff --git a/server/src/main/java/org/opensearch/common/logging/OpenSearchLogMessage.java b/server/src/main/java/org/opensearch/common/logging/OpenSearchLogMessage.java index dafe315ba046c..f163e5e6a2539 100644 --- a/server/src/main/java/org/opensearch/common/logging/OpenSearchLogMessage.java +++ b/server/src/main/java/org/opensearch/common/logging/OpenSearchLogMessage.java @@ -41,6 +41,8 @@ /** * A base class for custom log4j logger messages. Carries additional fields which will populate JSON fields in logs. + * + * @opensearch.internal */ @SuppressLoggerChecks(reason = "Safe as this is abstract class") public abstract class OpenSearchLogMessage extends ParameterizedMessage { diff --git a/server/src/main/java/org/opensearch/common/logging/OpenSearchMessageFieldConverter.java b/server/src/main/java/org/opensearch/common/logging/OpenSearchMessageFieldConverter.java index 6e0c1c4ef4c1b..fc9e523d00dd1 100644 --- a/server/src/main/java/org/opensearch/common/logging/OpenSearchMessageFieldConverter.java +++ b/server/src/main/java/org/opensearch/common/logging/OpenSearchMessageFieldConverter.java @@ -44,6 +44,8 @@ /** * Pattern converter to populate OpenSearchMessageField in a pattern. * It will only populate these if the event have message of type OpenSearchLogMessage. + * + * @opensearch.internal */ @Plugin(category = PatternConverter.CATEGORY, name = "OpenSearchMessageField") @ConverterKeys({ "OpenSearchMessageField" }) diff --git a/server/src/main/java/org/opensearch/common/logging/PrefixLogger.java b/server/src/main/java/org/opensearch/common/logging/PrefixLogger.java index eaec8a71e741f..7d55ee7dbf975 100644 --- a/server/src/main/java/org/opensearch/common/logging/PrefixLogger.java +++ b/server/src/main/java/org/opensearch/common/logging/PrefixLogger.java @@ -45,6 +45,8 @@ /** * A logger that prefixes all messages with a fixed prefix specified during construction. The prefix mechanism uses the marker construct, so * for the prefixes to appear, the logging layout pattern must include the marker in its pattern. + * + * @opensearch.internal */ class PrefixLogger extends ExtendedLoggerWrapper { diff --git a/server/src/main/java/org/opensearch/common/logging/RateLimitingFilter.java b/server/src/main/java/org/opensearch/common/logging/RateLimitingFilter.java index a93f1188a76a2..c6e8a714f045d 100644 --- a/server/src/main/java/org/opensearch/common/logging/RateLimitingFilter.java +++ b/server/src/main/java/org/opensearch/common/logging/RateLimitingFilter.java @@ -51,6 +51,11 @@ import static org.opensearch.common.logging.DeprecatedMessage.X_OPAQUE_ID_FIELD_NAME; +/** + * Filter that is rate limiting + * + * @opensearch.internal + */ @Plugin(name = "RateLimitingFilter", category = Node.CATEGORY, elementType = Filter.ELEMENT_TYPE) public class RateLimitingFilter extends AbstractFilter { diff --git a/server/src/main/java/org/opensearch/common/lucene/BytesRefs.java b/server/src/main/java/org/opensearch/common/lucene/BytesRefs.java index 34e32b03426d4..2600a9a96c9ec 100644 --- a/server/src/main/java/org/opensearch/common/lucene/BytesRefs.java +++ b/server/src/main/java/org/opensearch/common/lucene/BytesRefs.java @@ -35,6 +35,11 @@ import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; +/** + * Base bytes ref. + * + * @opensearch.internal + */ public class BytesRefs { /** diff --git a/server/src/main/java/org/opensearch/common/lucene/LoggerInfoStream.java b/server/src/main/java/org/opensearch/common/lucene/LoggerInfoStream.java index deca9baf56f1d..45a07e397cd6a 100644 --- a/server/src/main/java/org/opensearch/common/lucene/LoggerInfoStream.java +++ b/server/src/main/java/org/opensearch/common/lucene/LoggerInfoStream.java @@ -39,8 +39,12 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -/** An InfoStream (for Lucene's IndexWriter) that redirects - * messages to "lucene.iw.ifd" and "lucene.iw" Logger.trace. */ +/** + * An InfoStream (for Lucene's IndexWriter) that redirects + * messages to "lucene.iw.ifd" and "lucene.iw" Logger.trace. + * + * @opensearch.internal + */ public final class LoggerInfoStream extends InfoStream { private final Logger parentLogger; diff --git a/server/src/main/java/org/opensearch/common/lucene/Lucene.java b/server/src/main/java/org/opensearch/common/lucene/Lucene.java index 4cbc7a6668dee..63a85c2475063 100644 --- a/server/src/main/java/org/opensearch/common/lucene/Lucene.java +++ b/server/src/main/java/org/opensearch/common/lucene/Lucene.java @@ -119,6 +119,11 @@ import java.util.List; import java.util.Map; +/** + * Main lucene class. + * + * @opensearch.internal + */ public class Lucene { public static final String LATEST_CODEC = "Lucene91"; diff --git a/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java b/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java index a883e111f7c95..32581f2c843d5 100644 --- a/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java +++ b/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java @@ -42,6 +42,11 @@ import java.io.IOException; +/** + * A minimum score collector. + * + * @opensearch.internal + */ public class MinimumScoreCollector extends SimpleCollector { private final Collector collector; diff --git a/server/src/main/java/org/opensearch/common/lucene/ScorerAware.java b/server/src/main/java/org/opensearch/common/lucene/ScorerAware.java index 4fe253878021c..f8a0758a9533e 100644 --- a/server/src/main/java/org/opensearch/common/lucene/ScorerAware.java +++ b/server/src/main/java/org/opensearch/common/lucene/ScorerAware.java @@ -33,6 +33,11 @@ import org.apache.lucene.search.Scorable; +/** + * Interface that is scorer aware. + * + * @opensearch.internal + */ public interface ScorerAware { void setScorer(Scorable scorer); diff --git a/server/src/main/java/org/opensearch/common/lucene/ShardCoreKeyMap.java b/server/src/main/java/org/opensearch/common/lucene/ShardCoreKeyMap.java index 22360a23586df..017aef1528243 100644 --- a/server/src/main/java/org/opensearch/common/lucene/ShardCoreKeyMap.java +++ b/server/src/main/java/org/opensearch/common/lucene/ShardCoreKeyMap.java @@ -57,6 +57,8 @@ * segments so that at any time it only tracks live segments. * * NOTE: This is heavy. Avoid using this class unless absolutely required. + * + * @opensearch.internal */ public final class ShardCoreKeyMap { diff --git a/server/src/main/java/org/opensearch/common/lucene/index/FilterableTermsEnum.java b/server/src/main/java/org/opensearch/common/lucene/index/FilterableTermsEnum.java index ebd108b79d61a..61c9e9f54cb51 100644 --- a/server/src/main/java/org/opensearch/common/lucene/index/FilterableTermsEnum.java +++ b/server/src/main/java/org/opensearch/common/lucene/index/FilterableTermsEnum.java @@ -60,9 +60,16 @@ * A frequency TermsEnum that returns frequencies derived from a collection of * cached leaf termEnums. It also allows to provide a filter to explicitly * compute frequencies only for docs that match the filter (heavier!). + * + * @opensearch.internal */ public class FilterableTermsEnum extends TermsEnum { + /** + * Holds a terms enum, doc enum, and bitset + * + * @opensearch.internal + */ static class Holder { final TermsEnum termsEnum; @Nullable diff --git a/server/src/main/java/org/opensearch/common/lucene/index/FreqTermsEnum.java b/server/src/main/java/org/opensearch/common/lucene/index/FreqTermsEnum.java index bedd372d28453..eabdc25f1125a 100644 --- a/server/src/main/java/org/opensearch/common/lucene/index/FreqTermsEnum.java +++ b/server/src/main/java/org/opensearch/common/lucene/index/FreqTermsEnum.java @@ -48,6 +48,8 @@ /** * A frequency terms enum that maintains a cache of docFreq, totalTermFreq, or both for repeated term lookup. + * + * @opensearch.internal */ public class FreqTermsEnum extends FilterableTermsEnum implements Releasable { diff --git a/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchDirectoryReader.java b/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchDirectoryReader.java index 8d99eda7acf7d..26f3bb9ccbd92 100644 --- a/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchDirectoryReader.java +++ b/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchDirectoryReader.java @@ -43,6 +43,8 @@ /** * A {@link org.apache.lucene.index.FilterDirectoryReader} that exposes * OpenSearch internal per shard / index information like the shard ID. + * + * @opensearch.internal */ public final class OpenSearchDirectoryReader extends FilterDirectoryReader { diff --git a/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchLeafReader.java b/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchLeafReader.java index 5ff20666ed68d..10c76e43a7176 100644 --- a/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchLeafReader.java +++ b/server/src/main/java/org/opensearch/common/lucene/index/OpenSearchLeafReader.java @@ -39,6 +39,8 @@ /** * A {@link org.apache.lucene.index.FilterLeafReader} that exposes * OpenSearch internal per shard / index information like the shard ID. + * + * @opensearch.internal */ public final class OpenSearchLeafReader extends SequentialStoredFieldsLeafReader { diff --git a/server/src/main/java/org/opensearch/common/lucene/index/SequentialStoredFieldsLeafReader.java b/server/src/main/java/org/opensearch/common/lucene/index/SequentialStoredFieldsLeafReader.java index 73c6e1e73f897..3e6630af074fd 100644 --- a/server/src/main/java/org/opensearch/common/lucene/index/SequentialStoredFieldsLeafReader.java +++ b/server/src/main/java/org/opensearch/common/lucene/index/SequentialStoredFieldsLeafReader.java @@ -45,6 +45,8 @@ * {@link FilterLeafReader} that are used at search time in order to * leverage sequential access when retrieving stored fields in queries, * aggregations or during the fetch phase. + * + * @opensearch.internal */ public abstract class SequentialStoredFieldsLeafReader extends FilterLeafReader { /** diff --git a/server/src/main/java/org/opensearch/common/lucene/search/AutomatonQueries.java b/server/src/main/java/org/opensearch/common/lucene/search/AutomatonQueries.java index 12dec26090b48..ada5bc0598478 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/AutomatonQueries.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/AutomatonQueries.java @@ -47,6 +47,8 @@ /** * Helper functions for creating various forms of {@link AutomatonQuery} + * + * @opensearch.internal */ public class AutomatonQueries { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/FilteredCollector.java b/server/src/main/java/org/opensearch/common/lucene/search/FilteredCollector.java index 2dcb0578fd23d..0d7a8866f7788 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/FilteredCollector.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/FilteredCollector.java @@ -43,6 +43,11 @@ import java.io.IOException; +/** + * A filtered collector. + * + * @opensearch.internal + */ public class FilteredCollector implements Collector { private final Collector collector; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/MoreLikeThisQuery.java b/server/src/main/java/org/opensearch/common/lucene/search/MoreLikeThisQuery.java index bc83f07f74103..93d18b3533d5c 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/MoreLikeThisQuery.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/MoreLikeThisQuery.java @@ -59,6 +59,11 @@ import java.util.Objects; import java.util.Set; +/** + * The more like this query. + * + * @opensearch.internal + */ public class MoreLikeThisQuery extends Query { public static final String DEFAULT_MINIMUM_SHOULD_MATCH = "30%"; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/MultiPhrasePrefixQuery.java b/server/src/main/java/org/opensearch/common/lucene/search/MultiPhrasePrefixQuery.java index 982779333e7da..a893fcecf5b88 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/MultiPhrasePrefixQuery.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/MultiPhrasePrefixQuery.java @@ -55,6 +55,11 @@ import java.util.ListIterator; import java.util.Objects; +/** + * A multi phrase prefix query. + * + * @opensearch.internal + */ public class MultiPhrasePrefixQuery extends Query { private final String field; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/Queries.java b/server/src/main/java/org/opensearch/common/lucene/search/Queries.java index ac77420a79f73..8b64a45b9db25 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/Queries.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/Queries.java @@ -58,6 +58,11 @@ import java.util.Objects; import java.util.regex.Pattern; +/** + * Lucene queries class + * + * @opensearch.internal + */ public class Queries { public static Query newMatchAllQuery() { @@ -210,6 +215,11 @@ public static Query newMatchNoDocsQueryWithoutRewrite(String reason) { return new MatchNoDocsWithoutRewriteQuery(reason); } + /** + * Matches no docs w/o rewriting the query + * + * @opensearch.internal + */ static class MatchNoDocsWithoutRewriteQuery extends Query { private final String reason; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/SpanBooleanQueryRewriteWithMaxClause.java b/server/src/main/java/org/opensearch/common/lucene/search/SpanBooleanQueryRewriteWithMaxClause.java index 4b770529af4a8..65cffa208a47f 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/SpanBooleanQueryRewriteWithMaxClause.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/SpanBooleanQueryRewriteWithMaxClause.java @@ -59,6 +59,8 @@ * that match the {@link MultiTermQuery} in the terms dictionary. * The rewrite throws an error if more than maxExpansions terms are found and hardLimit * is set. + * + * @opensearch.internal */ public class SpanBooleanQueryRewriteWithMaxClause extends SpanMultiTermQueryWrapper.SpanRewriteMethod { private final int maxExpansions; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/TopDocsAndMaxScore.java b/server/src/main/java/org/opensearch/common/lucene/search/TopDocsAndMaxScore.java index b7976058afcf6..5f8c52676b481 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/TopDocsAndMaxScore.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/TopDocsAndMaxScore.java @@ -36,6 +36,8 @@ /** * Wrapper around a {@link TopDocs} instance and the maximum score. + * + * @opensearch.internal */ // TODO: Remove this class when https://github.com/elastic/elasticsearch/issues/32981 is addressed. public final class TopDocsAndMaxScore { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/XMoreLikeThis.java b/server/src/main/java/org/opensearch/common/lucene/search/XMoreLikeThis.java index 63e6304fa50e5..35aab81e94bc4 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/XMoreLikeThis.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/XMoreLikeThis.java @@ -165,6 +165,8 @@ * - refactor: moved common code into isNoiseWord() * - optimise: when no termvector support available - used maxNumTermsParsed to limit amount of tokenization * + * + * @opensearch.internal */ public final class XMoreLikeThis { @@ -1016,6 +1018,8 @@ public String[] retrieveInterestingTerms(Reader r, String fieldName) throws IOEx /** * PriorityQueue that orders words by score. + * + * @opensearch.internal */ private static class FreqQ extends PriorityQueue { FreqQ(int maxSize) { @@ -1028,6 +1032,11 @@ protected boolean lessThan(ScoreTerm a, ScoreTerm b) { } } + /** + * A scored term + * + * @opensearch.internal + */ private static class ScoreTerm { String word; String topField; @@ -1048,6 +1057,8 @@ void update(String word, String topField, float score) { /** * Use for frequencies and to avoid renewing Integers. + * + * @opensearch.internal */ private static class Int { int x; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/CombineFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/CombineFunction.java index 3e0a6f59b4e1a..48a729d347ea1 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/CombineFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/CombineFunction.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.Locale; +/** + * Combine function for search + * + * @opensearch.internal + */ public enum CombineFunction implements Writeable { MULTIPLY { @Override 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 3233fc9f8cecc..3a21246da06c0 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 @@ -51,6 +51,8 @@ * A function_score function that multiplies the score with the value of a * field from the document, optionally multiplying the field by a factor first, * and applying a modification (log, ln, sqrt, square, etc) afterwards. + * + * @opensearch.internal */ public class FieldValueFactorFunction extends ScoreFunction { private final String field; 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 09239b0108422..e52f77bf49216 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 @@ -62,10 +62,17 @@ /** * A query that allows for a pluggable boost function / filter. If it matches * the filter, it will be boosted by the formula. + * + * @opensearch.internal */ public class FunctionScoreQuery extends Query { public static final float DEFAULT_MAX_BOOST = Float.MAX_VALUE; + /** + * Filter score function + * + * @opensearch.internal + */ public static class FilterScoreFunction extends ScoreFunction { public final Query filter; public final ScoreFunction function; @@ -481,6 +488,11 @@ public boolean isCacheable(LeafReaderContext ctx) { } } + /** + * Internal function factor scorer + * + * @opensearch.internal + */ static class FunctionFactorScorer extends FilterScorer { private final ScoreFunction[] functions; private final ScoreMode scoreMode; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/Functions.java b/server/src/main/java/org/opensearch/common/lucene/search/function/Functions.java index a9de8ead31e2a..ce733bbe78684 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/Functions.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/Functions.java @@ -15,6 +15,8 @@ /** * Helper utility class for functions + * + * @opensearch.internal */ public final class Functions { private Functions() {} diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/LeafScoreFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/LeafScoreFunction.java index ad3c5b8031dd7..4ff283730a9a1 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/LeafScoreFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/LeafScoreFunction.java @@ -36,7 +36,11 @@ import java.io.IOException; -/** Per-leaf {@link ScoreFunction}. */ +/** + * Per-leaf {@link ScoreFunction}. + * + * @opensearch.internal + */ public abstract class LeafScoreFunction { public abstract double score(int docId, float subQueryScore) throws IOException; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/MinScoreScorer.java b/server/src/main/java/org/opensearch/common/lucene/search/function/MinScoreScorer.java index 368c41a149b63..30be06489dea5 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/MinScoreScorer.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/MinScoreScorer.java @@ -39,8 +39,12 @@ import java.io.IOException; -/** A {@link Scorer} that filters out documents that have a score that is - * lower than a configured constant. */ +/** + * A {@link Scorer} that filters out documents that have a score that is + * lower than a configured constant. + * + * @opensearch.internal + */ final class MinScoreScorer extends Scorer { private final Scorer in; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/RandomScoreFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/RandomScoreFunction.java index f4fcda47b0078..48b3e0d04bdc3 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/RandomScoreFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/RandomScoreFunction.java @@ -45,6 +45,8 @@ /** * Pseudo randomly generate a score for each {@link LeafScoreFunction#score}. + * + * @opensearch.internal */ public class RandomScoreFunction extends ScoreFunction { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/ScoreFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/ScoreFunction.java index 48200d9dbacff..fe01e8489d61f 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/ScoreFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/ScoreFunction.java @@ -38,6 +38,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Score function for search. + * + * @opensearch.internal + */ public abstract class ScoreFunction { private final CombineFunction scoreCombiner; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreFunction.java index 3a7cc970908a5..533d74e916c09 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreFunction.java @@ -44,6 +44,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Script score function for search. + * + * @opensearch.internal + */ public class ScriptScoreFunction extends ScoreFunction { static final class CannedScorer extends Scorable { diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreQuery.java b/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreQuery.java index 846cfd4b6431e..8bf5fc0f89d31 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreQuery.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/ScriptScoreQuery.java @@ -59,6 +59,8 @@ /** * A query that uses a script to compute documents' scores. + * + * @opensearch.internal */ public class ScriptScoreQuery extends Query { private final Query subQuery; @@ -244,6 +246,11 @@ public int hashCode() { return Objects.hash(subQuery, script, minScore, indexName, shardId, indexVersion, queryName); } + /** + * A script scorer + * + * @opensearch.internal + */ private static class ScriptScorer extends Scorer { private final ScoreScript scoreScript; private final Scorer subQueryScorer; @@ -303,6 +310,11 @@ public float getMaxScore(int upTo) { } + /** + * A script scorable + * + * @opensearch.internal + */ private static class ScriptScorable extends Scorable { private final ScoreScript scoreScript; private final Scorable subQueryScorer; @@ -352,6 +364,8 @@ public int docID() { /** * Use the {@link BulkScorer} of the sub-query, * as it may be significantly faster (e.g. BooleanScorer) than iterating over the scorer + * + * @opensearch.internal */ private static class ScriptScoreBulkScorer extends BulkScorer { private final BulkScorer subQueryBulkScorer; diff --git a/server/src/main/java/org/opensearch/common/lucene/search/function/WeightFactorFunction.java b/server/src/main/java/org/opensearch/common/lucene/search/function/WeightFactorFunction.java index 71968a0545cff..c439b57de41cd 100644 --- a/server/src/main/java/org/opensearch/common/lucene/search/function/WeightFactorFunction.java +++ b/server/src/main/java/org/opensearch/common/lucene/search/function/WeightFactorFunction.java @@ -40,6 +40,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Weight factor function + * + * @opensearch.internal + */ public class WeightFactorFunction extends ScoreFunction { private static final ScoreFunction SCORE_ONE = new ScoreOne(CombineFunction.MULTIPLY); @@ -123,6 +128,11 @@ protected int doHashCode() { return Objects.hash(weight, scoreFunction); } + /** + * A constant score of 1.0 + * + * @opensearch.internal + */ private static class ScoreOne extends ScoreFunction { private final String functionName; diff --git a/server/src/main/java/org/opensearch/common/lucene/store/ByteArrayIndexInput.java b/server/src/main/java/org/opensearch/common/lucene/store/ByteArrayIndexInput.java index ed352fbf208b3..0113d238869c5 100644 --- a/server/src/main/java/org/opensearch/common/lucene/store/ByteArrayIndexInput.java +++ b/server/src/main/java/org/opensearch/common/lucene/store/ByteArrayIndexInput.java @@ -38,6 +38,8 @@ /** * Wraps array of bytes into IndexInput + * + * @opensearch.internal */ public class ByteArrayIndexInput extends IndexInput { private final byte[] bytes; diff --git a/server/src/main/java/org/opensearch/common/lucene/store/FilterIndexOutput.java b/server/src/main/java/org/opensearch/common/lucene/store/FilterIndexOutput.java index e23cedf86eaa7..618e02e9546b2 100644 --- a/server/src/main/java/org/opensearch/common/lucene/store/FilterIndexOutput.java +++ b/server/src/main/java/org/opensearch/common/lucene/store/FilterIndexOutput.java @@ -37,6 +37,8 @@ /** * IndexOutput that delegates all calls to another IndexOutput + * + * @opensearch.internal */ public class FilterIndexOutput extends IndexOutput { diff --git a/server/src/main/java/org/opensearch/common/lucene/store/IndexOutputOutputStream.java b/server/src/main/java/org/opensearch/common/lucene/store/IndexOutputOutputStream.java index d0d776c816da2..f71b0d3e3617d 100644 --- a/server/src/main/java/org/opensearch/common/lucene/store/IndexOutputOutputStream.java +++ b/server/src/main/java/org/opensearch/common/lucene/store/IndexOutputOutputStream.java @@ -39,6 +39,8 @@ /** * {@link OutputStream} that writes into underlying IndexOutput + * + * @opensearch.internal */ public class IndexOutputOutputStream extends OutputStream { diff --git a/server/src/main/java/org/opensearch/common/lucene/store/InputStreamIndexInput.java b/server/src/main/java/org/opensearch/common/lucene/store/InputStreamIndexInput.java index 47e454b6f755c..71075de0037e2 100644 --- a/server/src/main/java/org/opensearch/common/lucene/store/InputStreamIndexInput.java +++ b/server/src/main/java/org/opensearch/common/lucene/store/InputStreamIndexInput.java @@ -37,6 +37,11 @@ import java.io.IOException; import java.io.InputStream; +/** + * Index input over an input stream. + * + * @opensearch.internal + */ public class InputStreamIndexInput extends InputStream { private final IndexInput indexInput; diff --git a/server/src/main/java/org/opensearch/common/lucene/uid/PerThreadIDVersionAndSeqNoLookup.java b/server/src/main/java/org/opensearch/common/lucene/uid/PerThreadIDVersionAndSeqNoLookup.java index 362badf046b75..60d1f9e41ea2c 100644 --- a/server/src/main/java/org/opensearch/common/lucene/uid/PerThreadIDVersionAndSeqNoLookup.java +++ b/server/src/main/java/org/opensearch/common/lucene/uid/PerThreadIDVersionAndSeqNoLookup.java @@ -61,6 +61,8 @@ * This class uses live docs, so it should be cached based on the * {@link org.apache.lucene.index.IndexReader#getReaderCacheHelper() reader cache helper} * rather than the {@link LeafReader#getCoreCacheHelper() core cache helper}. + * + * @opensearch.internal */ final class PerThreadIDVersionAndSeqNoLookup { // TODO: do we really need to store all this stuff? some if it might not speed up anything. diff --git a/server/src/main/java/org/opensearch/common/lucene/uid/Versions.java b/server/src/main/java/org/opensearch/common/lucene/uid/Versions.java index bd10085c0153f..09b9a7e3e692d 100644 --- a/server/src/main/java/org/opensearch/common/lucene/uid/Versions.java +++ b/server/src/main/java/org/opensearch/common/lucene/uid/Versions.java @@ -32,6 +32,11 @@ package org.opensearch.common.lucene.uid; +/** + * UID versions. + * + * @opensearch.internal + */ public final class Versions { /** used to indicate the write operation should succeed regardless of current version **/ diff --git a/server/src/main/java/org/opensearch/common/lucene/uid/VersionsAndSeqNoResolver.java b/server/src/main/java/org/opensearch/common/lucene/uid/VersionsAndSeqNoResolver.java index bea9c7b6bdc8c..57524bc3657d9 100644 --- a/server/src/main/java/org/opensearch/common/lucene/uid/VersionsAndSeqNoResolver.java +++ b/server/src/main/java/org/opensearch/common/lucene/uid/VersionsAndSeqNoResolver.java @@ -44,7 +44,11 @@ import java.util.Objects; import java.util.concurrent.ConcurrentMap; -/** Utility class to resolve the Lucene doc ID, version, seqNo and primaryTerms for a given uid. */ +/** + * Utility class to resolve the Lucene doc ID, version, seqNo and primaryTerms for a given uid. + * + * @opensearch.internal + */ public final class VersionsAndSeqNoResolver { static final ConcurrentMap> lookupStates = @@ -103,7 +107,11 @@ private static PerThreadIDVersionAndSeqNoLookup[] getLookupState(IndexReader rea private VersionsAndSeqNoResolver() {} - /** Wraps an {@link LeafReaderContext}, a doc ID relative to the context doc base and a version. */ + /** + * Wraps an {@link LeafReaderContext}, a doc ID relative to the context doc base and a version. + * + * @opensearch.internal + */ public static class DocIdAndVersion { public final int docId; public final long version; @@ -122,7 +130,11 @@ public DocIdAndVersion(int docId, long version, long seqNo, long primaryTerm, Le } } - /** Wraps an {@link LeafReaderContext}, a doc ID relative to the context doc base and a seqNo. */ + /** + * Wraps an {@link LeafReaderContext}, a doc ID relative to the context doc base and a seqNo. + * + * @opensearch.internal + */ public static class DocIdAndSeqNo { public final int docId; public final long seqNo; diff --git a/server/src/main/java/org/opensearch/common/metrics/CounterMetric.java b/server/src/main/java/org/opensearch/common/metrics/CounterMetric.java index 5d0b21df21a08..5c48c1f772ff0 100644 --- a/server/src/main/java/org/opensearch/common/metrics/CounterMetric.java +++ b/server/src/main/java/org/opensearch/common/metrics/CounterMetric.java @@ -34,6 +34,11 @@ import java.util.concurrent.atomic.LongAdder; +/** + * A counter metric for tracking. + * + * @opensearch.internal + */ public class CounterMetric implements Metric { private final LongAdder counter = new LongAdder(); diff --git a/server/src/main/java/org/opensearch/common/metrics/MeanMetric.java b/server/src/main/java/org/opensearch/common/metrics/MeanMetric.java index 977d8e62a3411..79c04d431e97b 100644 --- a/server/src/main/java/org/opensearch/common/metrics/MeanMetric.java +++ b/server/src/main/java/org/opensearch/common/metrics/MeanMetric.java @@ -34,6 +34,11 @@ import java.util.concurrent.atomic.LongAdder; +/** + * An average metric for tracking. + * + * @opensearch.internal + */ public class MeanMetric implements Metric { private final LongAdder counter = new LongAdder(); diff --git a/server/src/main/java/org/opensearch/common/metrics/Metric.java b/server/src/main/java/org/opensearch/common/metrics/Metric.java index f56d1dd0e7fad..f39de634ec477 100644 --- a/server/src/main/java/org/opensearch/common/metrics/Metric.java +++ b/server/src/main/java/org/opensearch/common/metrics/Metric.java @@ -32,4 +32,9 @@ package org.opensearch.common.metrics; +/** + * Base metric. + * + * @opensearch.internal + */ public interface Metric {} diff --git a/server/src/main/java/org/opensearch/common/network/Cidrs.java b/server/src/main/java/org/opensearch/common/network/Cidrs.java index 86034fa8cac9c..651ab8883a9aa 100644 --- a/server/src/main/java/org/opensearch/common/network/Cidrs.java +++ b/server/src/main/java/org/opensearch/common/network/Cidrs.java @@ -36,6 +36,11 @@ import java.util.Locale; import java.util.Objects; +/** + * Network Cidrs + * + * @opensearch.internal + */ public final class Cidrs { private Cidrs() {} diff --git a/server/src/main/java/org/opensearch/common/network/CloseableChannel.java b/server/src/main/java/org/opensearch/common/network/CloseableChannel.java index 054a5fac838e9..a849e0403a007 100644 --- a/server/src/main/java/org/opensearch/common/network/CloseableChannel.java +++ b/server/src/main/java/org/opensearch/common/network/CloseableChannel.java @@ -44,6 +44,11 @@ import java.util.List; import java.util.concurrent.ExecutionException; +/** + * Channel that can be closed + * + * @opensearch.internal + */ public interface CloseableChannel extends Closeable { /** diff --git a/server/src/main/java/org/opensearch/common/network/IfConfig.java b/server/src/main/java/org/opensearch/common/network/IfConfig.java index 6c4e14aa29700..9e2ef0263f6ed 100644 --- a/server/src/main/java/org/opensearch/common/network/IfConfig.java +++ b/server/src/main/java/org/opensearch/common/network/IfConfig.java @@ -46,6 +46,8 @@ /** * Simple class to log {@code ifconfig}-style output at DEBUG logging. + * + * @opensearch.internal */ public final class IfConfig { diff --git a/server/src/main/java/org/opensearch/common/network/InetAddresses.java b/server/src/main/java/org/opensearch/common/network/InetAddresses.java index 87a18f41deecc..a4fbc6cb65b0d 100644 --- a/server/src/main/java/org/opensearch/common/network/InetAddresses.java +++ b/server/src/main/java/org/opensearch/common/network/InetAddresses.java @@ -39,6 +39,11 @@ import java.util.Arrays; import java.util.Locale; +/** + * Network addresses. + * + * @opensearch.internal + */ public class InetAddresses { private static int IPV4_PART_COUNT = 4; private static int IPV6_PART_COUNT = 8; diff --git a/server/src/main/java/org/opensearch/common/network/NetworkAddress.java b/server/src/main/java/org/opensearch/common/network/NetworkAddress.java index 324e35f683a11..f5bc3face6e45 100644 --- a/server/src/main/java/org/opensearch/common/network/NetworkAddress.java +++ b/server/src/main/java/org/opensearch/common/network/NetworkAddress.java @@ -60,6 +60,8 @@ * This class provides sane address formatting instead, e.g. * {@code 127.0.0.1} and {@code ::1} respectively. No methods do reverse * lookups. + * + * @opensearch.internal */ public final class NetworkAddress { /** No instantiation */ diff --git a/server/src/main/java/org/opensearch/common/network/NetworkModule.java b/server/src/main/java/org/opensearch/common/network/NetworkModule.java index 0b517b8bda97a..49002802a8f07 100644 --- a/server/src/main/java/org/opensearch/common/network/NetworkModule.java +++ b/server/src/main/java/org/opensearch/common/network/NetworkModule.java @@ -74,6 +74,8 @@ /** * A module to handle registering and binding all network related classes. + * + * @opensearch.internal */ public final class NetworkModule { 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 b5cad48643b95..6a630dceadc18 100644 --- a/server/src/main/java/org/opensearch/common/network/NetworkService.java +++ b/server/src/main/java/org/opensearch/common/network/NetworkService.java @@ -48,6 +48,11 @@ import java.util.concurrent.TimeUnit; import java.util.function.Function; +/** + * Core network service. + * + * @opensearch.internal + */ public final class NetworkService { /** By default, we bind to loopback interfaces */ diff --git a/server/src/main/java/org/opensearch/common/network/NetworkUtils.java b/server/src/main/java/org/opensearch/common/network/NetworkUtils.java index 13e4e5d2434c1..8660b876fa187 100644 --- a/server/src/main/java/org/opensearch/common/network/NetworkUtils.java +++ b/server/src/main/java/org/opensearch/common/network/NetworkUtils.java @@ -52,6 +52,8 @@ /** * Utilities for network interfaces / addresses binding and publishing. * Its only intended for that purpose, not general purpose usage!!!! + * + * @opensearch.internal */ public abstract class NetworkUtils { 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 4f28b19700799..360da4c58bda9 100644 --- a/server/src/main/java/org/opensearch/common/path/PathTrie.java +++ b/server/src/main/java/org/opensearch/common/path/PathTrie.java @@ -43,6 +43,11 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; +/** + * Path based on a trie structure. + * + * @opensearch.internal + */ public class PathTrie { enum TrieMatchingMode { diff --git a/server/src/main/java/org/opensearch/common/recycler/AbstractRecycler.java b/server/src/main/java/org/opensearch/common/recycler/AbstractRecycler.java index 66adee7ae45f0..321062556ef86 100644 --- a/server/src/main/java/org/opensearch/common/recycler/AbstractRecycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/AbstractRecycler.java @@ -32,6 +32,11 @@ package org.opensearch.common.recycler; +/** + * Base recycler. + * + * @opensearch.internal + */ abstract class AbstractRecycler implements Recycler { protected final Recycler.C c; diff --git a/server/src/main/java/org/opensearch/common/recycler/AbstractRecyclerC.java b/server/src/main/java/org/opensearch/common/recycler/AbstractRecyclerC.java index 16a85ad6eda7f..8957880c27cdf 100644 --- a/server/src/main/java/org/opensearch/common/recycler/AbstractRecyclerC.java +++ b/server/src/main/java/org/opensearch/common/recycler/AbstractRecyclerC.java @@ -32,6 +32,11 @@ package org.opensearch.common.recycler; +/** + * Base recycler. + * + * @opensearch.internal + */ public abstract class AbstractRecyclerC implements Recycler.C { @Override diff --git a/server/src/main/java/org/opensearch/common/recycler/ConcurrentDequeRecycler.java b/server/src/main/java/org/opensearch/common/recycler/ConcurrentDequeRecycler.java index c279a554890a2..68d108d58603f 100644 --- a/server/src/main/java/org/opensearch/common/recycler/ConcurrentDequeRecycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/ConcurrentDequeRecycler.java @@ -39,6 +39,8 @@ /** * A {@link Recycler} implementation based on a concurrent {@link Deque}. This implementation is thread-safe. + * + * @opensearch.internal */ public class ConcurrentDequeRecycler extends DequeRecycler { diff --git a/server/src/main/java/org/opensearch/common/recycler/DequeRecycler.java b/server/src/main/java/org/opensearch/common/recycler/DequeRecycler.java index 44a6c86f791a7..1d6588119e7f5 100644 --- a/server/src/main/java/org/opensearch/common/recycler/DequeRecycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/DequeRecycler.java @@ -36,6 +36,8 @@ /** * A {@link Recycler} implementation based on a {@link Deque}. This implementation is NOT thread-safe. + * + * @opensearch.internal */ public class DequeRecycler extends AbstractRecycler { diff --git a/server/src/main/java/org/opensearch/common/recycler/FilterRecycler.java b/server/src/main/java/org/opensearch/common/recycler/FilterRecycler.java index 77a9a8cbc224d..e3825eb53c501 100644 --- a/server/src/main/java/org/opensearch/common/recycler/FilterRecycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/FilterRecycler.java @@ -32,6 +32,11 @@ package org.opensearch.common.recycler; +/** + * Base filter recycler. + * + * @opensearch.internal + */ abstract class FilterRecycler implements Recycler { /** Get the delegate instance to forward calls to. */ diff --git a/server/src/main/java/org/opensearch/common/recycler/NoneRecycler.java b/server/src/main/java/org/opensearch/common/recycler/NoneRecycler.java index cab62c7fc218d..d3d74138d3d6a 100644 --- a/server/src/main/java/org/opensearch/common/recycler/NoneRecycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/NoneRecycler.java @@ -32,6 +32,11 @@ package org.opensearch.common.recycler; +/** + * No value recycler + * + * @opensearch.internal + */ public class NoneRecycler extends AbstractRecycler { public NoneRecycler(C c) { @@ -43,6 +48,11 @@ public V obtain() { return new NV<>(c.newInstance()); } + /** + * Generic no value recycler + * + * @opensearch.internal + */ public static class NV implements Recycler.V { 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 e700a324f38f3..0c9127bf3ebde 100644 --- a/server/src/main/java/org/opensearch/common/recycler/Recycler.java +++ b/server/src/main/java/org/opensearch/common/recycler/Recycler.java @@ -37,6 +37,8 @@ /** * A recycled object, note, implementations should support calling obtain and then recycle * on different threads. + * + * @opensearch.internal */ public interface Recycler { diff --git a/server/src/main/java/org/opensearch/common/recycler/Recyclers.java b/server/src/main/java/org/opensearch/common/recycler/Recyclers.java index 6f7a254ec015c..74916cf4e6d10 100644 --- a/server/src/main/java/org/opensearch/common/recycler/Recyclers.java +++ b/server/src/main/java/org/opensearch/common/recycler/Recyclers.java @@ -36,6 +36,11 @@ import java.util.ArrayDeque; +/** + * Utility class of recyclers. + * + * @opensearch.internal + */ public enum Recyclers { ; diff --git a/server/src/main/java/org/opensearch/common/regex/Regex.java b/server/src/main/java/org/opensearch/common/regex/Regex.java index dc42b09848e36..2445f80cf7e28 100644 --- a/server/src/main/java/org/opensearch/common/regex/Regex.java +++ b/server/src/main/java/org/opensearch/common/regex/Regex.java @@ -42,6 +42,11 @@ import java.util.Locale; import java.util.regex.Pattern; +/** + * Main regex class. + * + * @opensearch.internal + */ public class Regex { /** diff --git a/server/src/main/java/org/opensearch/common/rounding/DateTimeUnit.java b/server/src/main/java/org/opensearch/common/rounding/DateTimeUnit.java index eb109ac3d9603..47e182b3caf84 100644 --- a/server/src/main/java/org/opensearch/common/rounding/DateTimeUnit.java +++ b/server/src/main/java/org/opensearch/common/rounding/DateTimeUnit.java @@ -39,6 +39,11 @@ import java.util.function.Function; +/** + * Main date time unit class. + * + * @opensearch.internal + */ public enum DateTimeUnit { WEEK_OF_WEEKYEAR((byte) 1, tz -> ISOChronology.getInstance(tz).weekOfWeekyear()), diff --git a/server/src/main/java/org/opensearch/common/rounding/Rounding.java b/server/src/main/java/org/opensearch/common/rounding/Rounding.java index 70677a79b125f..cbbbb09185ed2 100644 --- a/server/src/main/java/org/opensearch/common/rounding/Rounding.java +++ b/server/src/main/java/org/opensearch/common/rounding/Rounding.java @@ -47,6 +47,8 @@ * A strategy for rounding long values. * * Use the java based Rounding class where applicable + * + * @opensearch.internal */ @Deprecated public abstract class Rounding implements Writeable { @@ -81,6 +83,11 @@ public static Builder builder(TimeValue interval) { return new Builder(interval); } + /** + * Builder for rounding + * + * @opensearch.internal + */ public static class Builder { private final DateTimeUnit unit; @@ -118,6 +125,11 @@ public Rounding build() { } } + /** + * Rounding time units + * + * @opensearch.internal + */ static class TimeUnitRounding extends Rounding { static final byte ID = 1; @@ -284,6 +296,11 @@ public String toString() { } } + /** + * Rounding time intervals + * + * @opensearch.internal + */ static class TimeIntervalRounding extends Rounding { static final byte ID = 2; @@ -409,6 +426,11 @@ public boolean equals(Object obj) { } } + /** + * Rounding streams + * + * @opensearch.internal + */ public static class Streams { public static void write(Rounding rounding, StreamOutput out) throws IOException { 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 e6a8db808e72a..640e8cbca469a 100644 --- a/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java @@ -60,6 +60,8 @@ /** * A basic setting service that can be used for per-index and per-cluster settings. * This service offers transactional application of updates settings. + * + * @opensearch.internal */ public abstract class AbstractScopedSettings { diff --git a/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java b/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java index b52e55e099cb9..56b095ab8b185 100644 --- a/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java @@ -42,6 +42,11 @@ import java.nio.file.Path; +/** + * Base settings class for key store commands. + * + * @opensearch.internal + */ public abstract class BaseKeyStoreCommand extends KeyStoreAwareCommand { private KeyStoreWrapper keyStore; diff --git a/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java b/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java index d66caca68bfeb..bd8b6359688d6 100644 --- a/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java @@ -40,6 +40,8 @@ /** * A sub-command for the keystore cli which changes the password. + * + * @opensearch.internal */ class ChangeKeyStorePasswordCommand extends BaseKeyStoreCommand { diff --git a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java index c3f0212b99812..be92bf1643aee 100644 --- a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java @@ -148,6 +148,8 @@ /** * Encapsulates all valid cluster level settings. + * + * @opensearch.internal */ public final class ClusterSettings extends AbstractScopedSettings { diff --git a/server/src/main/java/org/opensearch/common/settings/ConsistentSettingsService.java b/server/src/main/java/org/opensearch/common/settings/ConsistentSettingsService.java index 2dbc8327eca1e..bcf9891c6da05 100644 --- a/server/src/main/java/org/opensearch/common/settings/ConsistentSettingsService.java +++ b/server/src/main/java/org/opensearch/common/settings/ConsistentSettingsService.java @@ -64,6 +64,8 @@ * Used to publish secure setting hashes in the cluster state and to validate those hashes against the local values of those same settings. * This is colloquially referred to as the secure setting consistency check. It will publish and verify hashes only for the collection * of settings passed in the constructor. The settings have to have the {@link Setting.Property#Consistent} property. + * + * @opensearch.internal */ public final class ConsistentSettingsService { private static final Logger logger = LogManager.getLogger(ConsistentSettingsService.class); diff --git a/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java b/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java index dc8993f55fae2..640e616bb2c77 100644 --- a/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java @@ -40,6 +40,11 @@ import java.nio.file.Path; +/** + * KeyStore command that has a password. + * + * @opensearch.internal + */ public class HasPasswordKeyStoreCommand extends KeyStoreAwareCommand { static final int NO_PASSWORD_EXIT_CODE = 1; diff --git a/server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java b/server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java index 68e1b5b598d40..ba2666b53d7a8 100644 --- a/server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java @@ -68,6 +68,8 @@ /** * Encapsulates all valid index level settings. * @see Property#IndexScope + * + * @opensearch.internal */ public final class IndexScopedSettings extends AbstractScopedSettings { diff --git a/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java b/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java index 900eda6975526..508e1bc38ea8a 100644 --- a/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java +++ b/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java @@ -91,6 +91,8 @@ * {@link #decrypt(char[])} with the keystore password, or an empty char array if * {@link #hasPassword()} is {@code false}. Loading and decrypting should happen * in a single thread. Once decrypted, settings may be read in multiple threads. + * + * @opensearch.internal */ public class KeyStoreWrapper implements SecureSettings { @@ -100,7 +102,11 @@ private enum EntryType { FILE } - /** An entry in the keystore. The bytes are opaque and interpreted based on the entry type. */ + /** + * An entry in the keystore. The bytes are opaque and interpreted based on the entry type. + * + * @opensearch.internal + */ private static class Entry { final byte[] bytes; final byte[] sha256Digest; diff --git a/server/src/main/java/org/opensearch/common/settings/NoClassSettingsException.java b/server/src/main/java/org/opensearch/common/settings/NoClassSettingsException.java index 5600900c1f02b..dc5d96536fc2c 100644 --- a/server/src/main/java/org/opensearch/common/settings/NoClassSettingsException.java +++ b/server/src/main/java/org/opensearch/common/settings/NoClassSettingsException.java @@ -40,7 +40,7 @@ * A specific type of {@link SettingsException} indicating failure to load a class * based on a settings value. * - * + * @opensearch.internal */ public class NoClassSettingsException extends SettingsException { 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 557710b7b69f1..ae5875cc8aaa0 100644 --- a/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java +++ b/server/src/main/java/org/opensearch/common/settings/PropertyPlaceholder.java @@ -46,6 +46,8 @@ *

* Values for substitution can be supplied using a {@link Properties} instance or using a * {@link PlaceholderResolver}. + * + * @opensearch.internal */ class PropertyPlaceholder { diff --git a/server/src/main/java/org/opensearch/common/settings/SecureSetting.java b/server/src/main/java/org/opensearch/common/settings/SecureSetting.java index fa828746ab36d..13abbcdc706e0 100644 --- a/server/src/main/java/org/opensearch/common/settings/SecureSetting.java +++ b/server/src/main/java/org/opensearch/common/settings/SecureSetting.java @@ -44,6 +44,8 @@ * A secure setting. * * This class allows access to settings from the OpenSearch keystore. + * + * @opensearch.internal */ public abstract class SecureSetting extends Setting { @@ -171,6 +173,11 @@ public static Setting secureFile(String name, Setting return new SecureFileSetting(name, fallback, properties); } + /** + * Setting for a secure string + * + * @opensearch.internal + */ private static class SecureStringSetting extends SecureSetting { private final Setting fallback; @@ -193,6 +200,11 @@ SecureString getFallback(Settings settings) { } } + /** + * An insecure string setting + * + * @opensearch.internal + */ private static class InsecureStringSetting extends Setting { private final String name; @@ -212,6 +224,11 @@ public SecureString get(Settings settings) { } } + /** + * A secure file setting + * + * @opensearch.internal + */ private static class SecureFileSetting extends SecureSetting { private final Setting fallback; diff --git a/server/src/main/java/org/opensearch/common/settings/SecureSettings.java b/server/src/main/java/org/opensearch/common/settings/SecureSettings.java index 05ed83573bb6c..e9829aac46716 100644 --- a/server/src/main/java/org/opensearch/common/settings/SecureSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/SecureSettings.java @@ -40,6 +40,8 @@ /** * An accessor for settings which are securely stored. See {@link SecureSetting}. + * + * @opensearch.internal */ public interface SecureSettings extends Closeable { diff --git a/server/src/main/java/org/opensearch/common/settings/SecureString.java b/server/src/main/java/org/opensearch/common/settings/SecureString.java index 83c6fbb78c976..468d760766b96 100644 --- a/server/src/main/java/org/opensearch/common/settings/SecureString.java +++ b/server/src/main/java/org/opensearch/common/settings/SecureString.java @@ -38,6 +38,8 @@ /** * A String implementations which allows clearing the underlying char array. + * + * @opensearch.internal */ public final class SecureString implements CharSequence, Closeable { 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 8618687218987..39cf0b9a4f32d 100644 --- a/server/src/main/java/org/opensearch/common/settings/Setting.java +++ b/server/src/main/java/org/opensearch/common/settings/Setting.java @@ -97,6 +97,8 @@ * new Setting<>("my.color.setting", Color.RED.toString(), Color::valueOf, Setting.Property.NodeScope); * } * + * + * @opensearch.internal */ public class Setting implements ToXContentObject { @@ -773,6 +775,11 @@ public interface AffixSettingDependency extends SettingDependency { } + /** + * An affix setting + * + * @opensearch.internal + */ public static class AffixSetting extends Setting { private final AffixKey key; private final BiFunction> delegateFactory; @@ -1044,6 +1051,11 @@ default Iterator> settings() { } + /** + * A group setting + * + * @opensearch.internal + */ private static class GroupSetting extends Setting { private final String key; private final Consumer validator; @@ -1918,6 +1930,11 @@ private static String arrayToParsableString(List array) { } } + /** + * A list setting + * + * @opensearch.internal + */ private static class ListSetting extends Setting> { private final Function> defaultStringValue; @@ -2234,6 +2251,11 @@ public interface Key { boolean match(String key); } + /** + * A simple key for a setting + * + * @opensearch.internal + */ public static class SimpleKey implements Key { protected final String key; diff --git a/server/src/main/java/org/opensearch/common/settings/SettingUpgrader.java b/server/src/main/java/org/opensearch/common/settings/SettingUpgrader.java index d841278b34405..1dabf020d8398 100644 --- a/server/src/main/java/org/opensearch/common/settings/SettingUpgrader.java +++ b/server/src/main/java/org/opensearch/common/settings/SettingUpgrader.java @@ -38,6 +38,8 @@ * Represents the logic to upgrade a setting. * * @param the type of the underlying setting + * + * @opensearch.internal */ public interface SettingUpgrader { diff --git a/server/src/main/java/org/opensearch/common/settings/Settings.java b/server/src/main/java/org/opensearch/common/settings/Settings.java index 9b9d3f54ffa1b..725817ef22c6c 100644 --- a/server/src/main/java/org/opensearch/common/settings/Settings.java +++ b/server/src/main/java/org/opensearch/common/settings/Settings.java @@ -91,6 +91,8 @@ /** * An immutable settings implementation. + * + * @opensearch.internal */ public final class Settings implements ToXContentFragment { @@ -338,6 +340,8 @@ public boolean hasValue(String key) { * We have to lazy initialize the deprecation logger as otherwise a static logger here would be constructed before logging is configured * leading to a runtime failure (see {@link LogConfigurator#checkErrorListener()} ). The premature construction would come from any * {@link Setting} object constructed in, for example, {@link org.opensearch.env.Environment}. + * + * @opensearch.internal */ static class DeprecationLoggerHolder { static DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(Settings.class); @@ -742,6 +746,8 @@ public Set keySet() { * A builder allowing to put different settings and then {@link #build()} an immutable * settings implementation. Use {@link Settings#builder()} in order to * construct it. + * + * @opensearch.internal */ public static class Builder { @@ -1357,6 +1363,11 @@ public int size() { } } + /** + * Prefixed secure settings + * + * @opensearch.internal + */ private static class PrefixedSecureSettings implements SecureSettings { private final SecureSettings delegate; private final UnaryOperator addPrefix; diff --git a/server/src/main/java/org/opensearch/common/settings/SettingsException.java b/server/src/main/java/org/opensearch/common/settings/SettingsException.java index db1c70ae20889..965255903d23f 100644 --- a/server/src/main/java/org/opensearch/common/settings/SettingsException.java +++ b/server/src/main/java/org/opensearch/common/settings/SettingsException.java @@ -40,7 +40,7 @@ /** * A generic failure to handle settings. * - * + * @opensearch.internal */ public class SettingsException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/common/settings/SettingsFilter.java b/server/src/main/java/org/opensearch/common/settings/SettingsFilter.java index 43e6553aba128..9914674068e66 100644 --- a/server/src/main/java/org/opensearch/common/settings/SettingsFilter.java +++ b/server/src/main/java/org/opensearch/common/settings/SettingsFilter.java @@ -47,6 +47,8 @@ /** * A class that allows to filter settings objects by simple regular expression patterns or full settings keys. * It's used for response filtering on the rest layer to for instance filter out sensitive information like access keys. + * + * @opensearch.internal */ public final class SettingsFilter { /** diff --git a/server/src/main/java/org/opensearch/common/settings/SettingsModule.java b/server/src/main/java/org/opensearch/common/settings/SettingsModule.java index 0874814f940d4..16b39bb2e33f9 100644 --- a/server/src/main/java/org/opensearch/common/settings/SettingsModule.java +++ b/server/src/main/java/org/opensearch/common/settings/SettingsModule.java @@ -55,6 +55,8 @@ /** * A module that binds the provided settings to the {@link Settings} interface. + * + * @opensearch.internal */ public class SettingsModule implements Module { private static final Logger logger = LogManager.getLogger(SettingsModule.class); diff --git a/server/src/main/java/org/opensearch/common/settings/UpgradeKeyStoreCommand.java b/server/src/main/java/org/opensearch/common/settings/UpgradeKeyStoreCommand.java index 36707a8c32428..e3f7439443f0f 100644 --- a/server/src/main/java/org/opensearch/common/settings/UpgradeKeyStoreCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/UpgradeKeyStoreCommand.java @@ -38,6 +38,8 @@ /** * A sub-command for the keystore CLI that enables upgrading the keystore format. + * + * @opensearch.internal */ public class UpgradeKeyStoreCommand extends BaseKeyStoreCommand { diff --git a/server/src/main/java/org/opensearch/common/text/Text.java b/server/src/main/java/org/opensearch/common/text/Text.java index 6756fa8a001f0..389195ba07926 100644 --- a/server/src/main/java/org/opensearch/common/text/Text.java +++ b/server/src/main/java/org/opensearch/common/text/Text.java @@ -43,6 +43,8 @@ /** * Both {@link String} and {@link BytesReference} representation of the text. Starts with one of those, and if * the other is requests, caches the other one in a local reference so no additional conversion will be needed. + * + * @opensearch.internal */ public final class Text implements Comparable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/common/time/DateFormatter.java b/server/src/main/java/org/opensearch/common/time/DateFormatter.java index 4ff810a1c5041..dec08b68644f2 100644 --- a/server/src/main/java/org/opensearch/common/time/DateFormatter.java +++ b/server/src/main/java/org/opensearch/common/time/DateFormatter.java @@ -46,6 +46,11 @@ import java.util.Locale; import java.util.stream.Collectors; +/** + * Base Date formatter + * + * @opensearch.internal + */ public interface DateFormatter { /** diff --git a/server/src/main/java/org/opensearch/common/time/DateFormatters.java b/server/src/main/java/org/opensearch/common/time/DateFormatters.java index bf8b9ea67ea94..26af6fc40429d 100644 --- a/server/src/main/java/org/opensearch/common/time/DateFormatters.java +++ b/server/src/main/java/org/opensearch/common/time/DateFormatters.java @@ -67,6 +67,11 @@ import static java.time.temporal.ChronoField.NANO_OF_SECOND; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; +/** + * Utility of date formatters. + * + * @opensearch.internal + */ public class DateFormatters { // when run with JDK8, WeekFields for Locale.ROOT would return WeekFields.of(DayOfWeek.SUNDAY,1) public static final WeekFields WEEK_FIELDS_ROOT = WeekFields.of(DayOfWeek.MONDAY, 4); diff --git a/server/src/main/java/org/opensearch/common/time/DateMathParser.java b/server/src/main/java/org/opensearch/common/time/DateMathParser.java index f75f70c35a31f..f6573eaa90286 100644 --- a/server/src/main/java/org/opensearch/common/time/DateMathParser.java +++ b/server/src/main/java/org/opensearch/common/time/DateMathParser.java @@ -40,6 +40,8 @@ /** * An abstraction over date math parsing to allow different implementation for joda and java time. + * + * @opensearch.internal */ public interface DateMathParser { diff --git a/server/src/main/java/org/opensearch/common/time/DateUtils.java b/server/src/main/java/org/opensearch/common/time/DateUtils.java index 4eec4e810af3b..021b8a3be8b23 100644 --- a/server/src/main/java/org/opensearch/common/time/DateUtils.java +++ b/server/src/main/java/org/opensearch/common/time/DateUtils.java @@ -51,6 +51,11 @@ import static org.opensearch.common.time.DateUtilsRounding.getYear; import static org.opensearch.common.time.DateUtilsRounding.utcMillisAtStartOfYear; +/** + * Date utilities. + * + * @opensearch.internal + */ public class DateUtils { public static DateTimeZone zoneIdToDateTimeZone(ZoneId zoneId) { if (zoneId == null) { diff --git a/server/src/main/java/org/opensearch/common/time/DateUtilsRounding.java b/server/src/main/java/org/opensearch/common/time/DateUtilsRounding.java index 4b0fa49b76687..f3459a5857b9e 100644 --- a/server/src/main/java/org/opensearch/common/time/DateUtilsRounding.java +++ b/server/src/main/java/org/opensearch/common/time/DateUtilsRounding.java @@ -42,6 +42,8 @@ * - org.joda.time.chrono.BasicChronology.getYear(int year) * - org.joda.time.chrono.BasicGJChronology.getMonthOfYear(long utcMillis, int year) * - org.joda.time.chrono.BasicGJChronology.getTotalMillisByYearMonth(int year, int month) + * + * @opensearch.internal */ class DateUtilsRounding { diff --git a/server/src/main/java/org/opensearch/common/time/EpochTime.java b/server/src/main/java/org/opensearch/common/time/EpochTime.java index 7894a653492c8..c80d95aad1283 100644 --- a/server/src/main/java/org/opensearch/common/time/EpochTime.java +++ b/server/src/main/java/org/opensearch/common/time/EpochTime.java @@ -55,6 +55,8 @@ * The milliseconds formatter is provided by {@link #MILLIS_FORMATTER}. *

* Both formatters support fractional time, up to nanosecond precision. + * + * @opensearch.internal */ class EpochTime { @@ -270,6 +272,11 @@ public long getFrom(TemporalAccessor temporal) { MILLISECONDS_FORMATTER2 ); + /** + * Base class for an epoch field + * + * @opensearch.internal + */ private abstract static class EpochField implements TemporalField { private final TemporalUnit baseUnit; diff --git a/server/src/main/java/org/opensearch/common/time/FormatNames.java b/server/src/main/java/org/opensearch/common/time/FormatNames.java index 4e1cfc5df87fc..ba0a8fcf4a17a 100644 --- a/server/src/main/java/org/opensearch/common/time/FormatNames.java +++ b/server/src/main/java/org/opensearch/common/time/FormatNames.java @@ -37,6 +37,11 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +/** + * Date format names. + * + * @opensearch.internal + */ public enum FormatNames { ISO8601(null, "iso8601"), BASIC_DATE("basicDate", "basic_date"), diff --git a/server/src/main/java/org/opensearch/common/time/IsoCalendarDataProvider.java b/server/src/main/java/org/opensearch/common/time/IsoCalendarDataProvider.java index f54bacc08f1f9..30a2cde37bbc1 100644 --- a/server/src/main/java/org/opensearch/common/time/IsoCalendarDataProvider.java +++ b/server/src/main/java/org/opensearch/common/time/IsoCalendarDataProvider.java @@ -41,6 +41,8 @@ * This class overrides default behaviour for Locale.ROOT (start of the week Sunday, minimum 1 day in the first week of the year). * Java SPI mechanism requires java.locale.providers to contain SPI value (i.e. java.locale.providers=SPI,COMPAT) * @see ISO week date + * + * @opensearch.internal */ public class IsoCalendarDataProvider extends CalendarDataProvider { diff --git a/server/src/main/java/org/opensearch/common/time/JavaDateFormatter.java b/server/src/main/java/org/opensearch/common/time/JavaDateFormatter.java index 289dd0fe1ea29..f9eeab38b2848 100644 --- a/server/src/main/java/org/opensearch/common/time/JavaDateFormatter.java +++ b/server/src/main/java/org/opensearch/common/time/JavaDateFormatter.java @@ -73,6 +73,11 @@ class JavaDateFormatter implements DateFormatter { private final List parsers; private final JavaDateFormatter roundupParser; + /** + * A round up formatter + * + * @opensearch.internal + */ static class RoundUpFormatter extends JavaDateFormatter { RoundUpFormatter(String format, List roundUpParsers) { diff --git a/server/src/main/java/org/opensearch/common/time/JavaDateMathParser.java b/server/src/main/java/org/opensearch/common/time/JavaDateMathParser.java index 87119002b070e..1110d07693c85 100644 --- a/server/src/main/java/org/opensearch/common/time/JavaDateMathParser.java +++ b/server/src/main/java/org/opensearch/common/time/JavaDateMathParser.java @@ -55,6 +55,8 @@ * The format of the datetime is configurable, and unix timestamps can also be used. Datemath * is appended to a datetime with the following syntax: * ||[+-/](\d+)?[yMwdhHms]. + * + * @opensearch.internal */ public class JavaDateMathParser implements DateMathParser { diff --git a/server/src/main/java/org/opensearch/common/transport/BoundTransportAddress.java b/server/src/main/java/org/opensearch/common/transport/BoundTransportAddress.java index a6aae5674615b..2a131c6704724 100644 --- a/server/src/main/java/org/opensearch/common/transport/BoundTransportAddress.java +++ b/server/src/main/java/org/opensearch/common/transport/BoundTransportAddress.java @@ -43,6 +43,8 @@ * A bounded transport address is a tuple of {@link TransportAddress}, one array that represents * the addresses the transport is bound to, and the other is the published one that represents the address clients * should communicate on. + * + * @opensearch.internal */ public class BoundTransportAddress implements Writeable { diff --git a/server/src/main/java/org/opensearch/common/transport/NetworkExceptionHelper.java b/server/src/main/java/org/opensearch/common/transport/NetworkExceptionHelper.java index c950749b4979d..72f8146cb969d 100644 --- a/server/src/main/java/org/opensearch/common/transport/NetworkExceptionHelper.java +++ b/server/src/main/java/org/opensearch/common/transport/NetworkExceptionHelper.java @@ -35,6 +35,11 @@ import java.net.ConnectException; import java.nio.channels.ClosedChannelException; +/** + * Helper class for network exceptions. + * + * @opensearch.internal + */ public class NetworkExceptionHelper { public static boolean isConnectException(Throwable e) { 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 c2f164680463a..c3ab5084e6e01 100644 --- a/server/src/main/java/org/opensearch/common/transport/PortsRange.java +++ b/server/src/main/java/org/opensearch/common/transport/PortsRange.java @@ -36,6 +36,11 @@ import java.util.StringTokenizer; +/** + * Port range utility classes + * + * @opensearch.internal + */ public class PortsRange { private final String portRange; diff --git a/server/src/main/java/org/opensearch/common/transport/TransportAddress.java b/server/src/main/java/org/opensearch/common/transport/TransportAddress.java index 3efdfb1f97681..666962e9aeb7b 100644 --- a/server/src/main/java/org/opensearch/common/transport/TransportAddress.java +++ b/server/src/main/java/org/opensearch/common/transport/TransportAddress.java @@ -46,6 +46,8 @@ /** * A transport address used for IP socket address (wraps {@link java.net.InetSocketAddress}). + * + * @opensearch.internal */ public final class TransportAddress implements Writeable, ToXContentFragment { diff --git a/server/src/main/java/org/opensearch/common/unit/ByteSizeUnit.java b/server/src/main/java/org/opensearch/common/unit/ByteSizeUnit.java index 1552833fe5694..0a407bb3fe4bc 100644 --- a/server/src/main/java/org/opensearch/common/unit/ByteSizeUnit.java +++ b/server/src/main/java/org/opensearch/common/unit/ByteSizeUnit.java @@ -44,6 +44,8 @@ * A {@code SizeUnit} does not maintain size information, but only * helps organize and use size representations that may be maintained * separately across various contexts. + * + * @opensearch.internal */ public enum ByteSizeUnit implements Writeable { BYTES { diff --git a/server/src/main/java/org/opensearch/common/unit/ByteSizeValue.java b/server/src/main/java/org/opensearch/common/unit/ByteSizeValue.java index 4f58abc64e495..b8aca01e3058d 100644 --- a/server/src/main/java/org/opensearch/common/unit/ByteSizeValue.java +++ b/server/src/main/java/org/opensearch/common/unit/ByteSizeValue.java @@ -47,12 +47,19 @@ import java.util.Locale; import java.util.Objects; +/** + * A byte size value + * + * @opensearch.internal + */ public class ByteSizeValue implements Writeable, Comparable, ToXContentFragment { /** * We have to lazy initialize the deprecation logger as otherwise a static logger here would be constructed before logging is configured * leading to a runtime failure (see {@link LogConfigurator#checkErrorListener()} ). The premature construction would come from any * {@link ByteSizeValue} object constructed in, for example, settings in {@link NetworkService}. + * + * @opensearch.internal */ static class DeprecationLoggerHolder { static DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(ByteSizeValue.class); diff --git a/server/src/main/java/org/opensearch/common/unit/DistanceUnit.java b/server/src/main/java/org/opensearch/common/unit/DistanceUnit.java index a4df3c6b5902d..0ca9dfe5f394e 100644 --- a/server/src/main/java/org/opensearch/common/unit/DistanceUnit.java +++ b/server/src/main/java/org/opensearch/common/unit/DistanceUnit.java @@ -45,6 +45,8 @@ * others. Some methods like {@link DistanceUnit#getEarthCircumference} refer to * the earth ellipsoid defined in {@link GeoUtils}. The default unit used within * this project is METERS which is defined by DEFAULT + * + * @opensearch.internal */ public enum DistanceUnit implements Writeable { INCH(0.0254, "in", "inch"), @@ -225,6 +227,8 @@ public static DistanceUnit parseUnit(String distance, DistanceUnit defaultUnit) /** * This class implements a value+unit tuple. + * + * @opensearch.internal */ public static class Distance implements Comparable { public final double value; diff --git a/server/src/main/java/org/opensearch/common/unit/Fuzziness.java b/server/src/main/java/org/opensearch/common/unit/Fuzziness.java index 8b10d88235142..c3b6ea6b8c23d 100644 --- a/server/src/main/java/org/opensearch/common/unit/Fuzziness.java +++ b/server/src/main/java/org/opensearch/common/unit/Fuzziness.java @@ -48,6 +48,8 @@ * A unit class that encapsulates all in-exact search * parsing and conversion from similarities to edit distances * etc. + * + * @opensearch.internal */ public final class Fuzziness implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/common/unit/MemorySizeValue.java b/server/src/main/java/org/opensearch/common/unit/MemorySizeValue.java index ef212762c3ffe..18aae6277c379 100644 --- a/server/src/main/java/org/opensearch/common/unit/MemorySizeValue.java +++ b/server/src/main/java/org/opensearch/common/unit/MemorySizeValue.java @@ -39,7 +39,11 @@ import static org.opensearch.common.unit.ByteSizeValue.parseBytesSizeValue; -/** Utility methods to get memory sizes. */ +/** + * Utility methods to get memory sizes. + * + * @opensearch.internal + */ public enum MemorySizeValue { ; diff --git a/server/src/main/java/org/opensearch/common/unit/RatioValue.java b/server/src/main/java/org/opensearch/common/unit/RatioValue.java index 00cd999ed6264..7f1840dae0fc7 100644 --- a/server/src/main/java/org/opensearch/common/unit/RatioValue.java +++ b/server/src/main/java/org/opensearch/common/unit/RatioValue.java @@ -36,6 +36,8 @@ /** * Utility class to represent ratio and percentage values between 0 and 100 + * + * @opensearch.internal */ public class RatioValue { private final double percent; diff --git a/server/src/main/java/org/opensearch/common/unit/SizeUnit.java b/server/src/main/java/org/opensearch/common/unit/SizeUnit.java index 8ceb0bc9f5360..a9491ef1919ed 100644 --- a/server/src/main/java/org/opensearch/common/unit/SizeUnit.java +++ b/server/src/main/java/org/opensearch/common/unit/SizeUnit.java @@ -32,6 +32,11 @@ package org.opensearch.common.unit; +/** + * Utility classe for size units. + * + * @opensearch.internal + */ public enum SizeUnit { SINGLE { @Override diff --git a/server/src/main/java/org/opensearch/common/unit/SizeValue.java b/server/src/main/java/org/opensearch/common/unit/SizeValue.java index 1a644823d3dd9..bebb3fdf2a895 100644 --- a/server/src/main/java/org/opensearch/common/unit/SizeValue.java +++ b/server/src/main/java/org/opensearch/common/unit/SizeValue.java @@ -40,6 +40,11 @@ import java.io.IOException; +/** + * Conversion values. + * + * @opensearch.internal + */ public class SizeValue implements Writeable, Comparable { private final long size; diff --git a/server/src/main/java/org/opensearch/common/util/AbstractArray.java b/server/src/main/java/org/opensearch/common/util/AbstractArray.java index 3833b479c946f..c3560ec1e8665 100644 --- a/server/src/main/java/org/opensearch/common/util/AbstractArray.java +++ b/server/src/main/java/org/opensearch/common/util/AbstractArray.java @@ -38,6 +38,11 @@ import java.util.Collections; import java.util.concurrent.atomic.AtomicBoolean; +/** + * Base array + * + * @opensearch.internal + */ abstract class AbstractArray implements BigArray { private final BigArrays bigArrays; diff --git a/server/src/main/java/org/opensearch/common/util/AbstractBigArray.java b/server/src/main/java/org/opensearch/common/util/AbstractBigArray.java index 4b18ebba81045..e8fd3990befa8 100644 --- a/server/src/main/java/org/opensearch/common/util/AbstractBigArray.java +++ b/server/src/main/java/org/opensearch/common/util/AbstractBigArray.java @@ -40,7 +40,11 @@ import java.lang.reflect.Array; import java.util.Arrays; -/** Common implementation for array lists that slice data into fixed-size blocks. */ +/** + * Common implementation for array lists that slice data into fixed-size blocks. + * + * @opensearch.internal + */ abstract class AbstractBigArray extends AbstractArray { private final PageCacheRecycler recycler; diff --git a/server/src/main/java/org/opensearch/common/util/AbstractHash.java b/server/src/main/java/org/opensearch/common/util/AbstractHash.java index edf4d93ef410a..ce12a4f5d1bf2 100644 --- a/server/src/main/java/org/opensearch/common/util/AbstractHash.java +++ b/server/src/main/java/org/opensearch/common/util/AbstractHash.java @@ -37,6 +37,8 @@ /** * Base implementation for {@link BytesRefHash} and {@link LongHash}, or any class that * needs to map values to dense ords. This class is not thread-safe. + * + * @opensearch.internal */ // IDs are internally stored as id + 1 so that 0 encodes for an empty slot abstract class AbstractHash extends AbstractPagedHashMap { diff --git a/server/src/main/java/org/opensearch/common/util/AbstractPagedHashMap.java b/server/src/main/java/org/opensearch/common/util/AbstractPagedHashMap.java index bc76bfa52404d..1ff3038297008 100644 --- a/server/src/main/java/org/opensearch/common/util/AbstractPagedHashMap.java +++ b/server/src/main/java/org/opensearch/common/util/AbstractPagedHashMap.java @@ -37,6 +37,8 @@ /** * Base implementation for a hash table that is paged, recycles arrays and grows in-place. + * + * @opensearch.internal */ abstract class AbstractPagedHashMap implements Releasable { diff --git a/server/src/main/java/org/opensearch/common/util/ArrayUtils.java b/server/src/main/java/org/opensearch/common/util/ArrayUtils.java index ccd6a51ff505d..6a01d9b3901e5 100644 --- a/server/src/main/java/org/opensearch/common/util/ArrayUtils.java +++ b/server/src/main/java/org/opensearch/common/util/ArrayUtils.java @@ -35,6 +35,11 @@ import java.lang.reflect.Array; import java.util.Arrays; +/** + * Array utilities. + * + * @opensearch.internal + */ public class ArrayUtils { private ArrayUtils() {} diff --git a/server/src/main/java/org/opensearch/common/util/BigArray.java b/server/src/main/java/org/opensearch/common/util/BigArray.java index c71b3da9ef14c..f6cac6374bbeb 100644 --- a/server/src/main/java/org/opensearch/common/util/BigArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigArray.java @@ -35,7 +35,11 @@ import org.apache.lucene.util.Accountable; import org.opensearch.common.lease.Releasable; -/** Base abstraction of an array. */ +/** + * Base abstraction of an array. + * + * @opensearch.internal + */ public interface BigArray extends Releasable, Accountable { /** Return the length of this array. */ diff --git a/server/src/main/java/org/opensearch/common/util/BigArrays.java b/server/src/main/java/org/opensearch/common/util/BigArrays.java index e877f75bd2a0f..b3a4a7d25d3f5 100644 --- a/server/src/main/java/org/opensearch/common/util/BigArrays.java +++ b/server/src/main/java/org/opensearch/common/util/BigArrays.java @@ -84,6 +84,11 @@ static boolean indexIsInt(long index) { return index == (int) index; } + /** + * Base array wrapper class + * + * @opensearch.internal + */ private abstract static class AbstractArrayWrapper extends AbstractArray implements BigArray { static final long SHALLOW_SIZE = RamUsageEstimator.shallowSizeOfInstance(ByteArrayWrapper.class); @@ -109,6 +114,11 @@ protected final void doClose() { } + /** + * Wraps a byte array + * + * @opensearch.internal + */ private static class ByteArrayWrapper extends AbstractArrayWrapper implements ByteArray { private final byte[] array; @@ -170,6 +180,11 @@ public byte[] array() { } } + /** + * Wraps an int array + * + * @opensearch.internal + */ private static class IntArrayWrapper extends AbstractArrayWrapper implements IntArray { private final int[] array; @@ -213,6 +228,11 @@ public void fill(long fromIndex, long toIndex, int value) { } + /** + * Wraps a long array + * + * @opensearch.internal + */ private static class LongArrayWrapper extends AbstractArrayWrapper implements LongArray { private final long[] array; @@ -255,6 +275,11 @@ public void fill(long fromIndex, long toIndex, long value) { } } + /** + * Wraps a double array + * + * @opensearch.internal + */ private static class DoubleArrayWrapper extends AbstractArrayWrapper implements DoubleArray { private final long[] array; @@ -298,6 +323,11 @@ public void fill(long fromIndex, long toIndex, double value) { } + /** + * Wraps a float array + * + * @opensearch.internal + */ private static class FloatArrayWrapper extends AbstractArrayWrapper implements FloatArray { private final int[] array; @@ -341,6 +371,11 @@ public void fill(long fromIndex, long toIndex, float value) { } + /** + * Wraps an object array + * + * @opensearch.internal + */ private static class ObjectArrayWrapper extends AbstractArrayWrapper implements ObjectArray { private final Object[] array; @@ -716,6 +751,11 @@ public DoubleArray grow(DoubleArray array, long minSize) { return resize(array, newSize); } + /** + * A double value binary searcher + * + * @opensearch.internal + */ public static class DoubleBinarySearcher extends BinarySearcher { DoubleArray array; diff --git a/server/src/main/java/org/opensearch/common/util/BigByteArray.java b/server/src/main/java/org/opensearch/common/util/BigByteArray.java index 6dac5ec705ad2..db1d1014ffed2 100644 --- a/server/src/main/java/org/opensearch/common/util/BigByteArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigByteArray.java @@ -43,6 +43,8 @@ /** * Byte array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigByteArray extends AbstractBigArray implements ByteArray { diff --git a/server/src/main/java/org/opensearch/common/util/BigDoubleArray.java b/server/src/main/java/org/opensearch/common/util/BigDoubleArray.java index ad75f13c80a8c..c66b0720d0a85 100644 --- a/server/src/main/java/org/opensearch/common/util/BigDoubleArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigDoubleArray.java @@ -42,6 +42,8 @@ /** * Double array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigDoubleArray extends AbstractBigArray implements DoubleArray { diff --git a/server/src/main/java/org/opensearch/common/util/BigFloatArray.java b/server/src/main/java/org/opensearch/common/util/BigFloatArray.java index 5935e02f9a920..028248c3cc961 100644 --- a/server/src/main/java/org/opensearch/common/util/BigFloatArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigFloatArray.java @@ -42,6 +42,8 @@ /** * Float array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigFloatArray extends AbstractBigArray implements FloatArray { diff --git a/server/src/main/java/org/opensearch/common/util/BigIntArray.java b/server/src/main/java/org/opensearch/common/util/BigIntArray.java index d403d99e285c9..03ae3e642df3d 100644 --- a/server/src/main/java/org/opensearch/common/util/BigIntArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigIntArray.java @@ -42,6 +42,8 @@ /** * Int array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigIntArray extends AbstractBigArray implements IntArray { diff --git a/server/src/main/java/org/opensearch/common/util/BigLongArray.java b/server/src/main/java/org/opensearch/common/util/BigLongArray.java index 23a72706fccdd..19f954eca2d64 100644 --- a/server/src/main/java/org/opensearch/common/util/BigLongArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigLongArray.java @@ -42,6 +42,8 @@ /** * Long array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigLongArray extends AbstractBigArray implements LongArray { diff --git a/server/src/main/java/org/opensearch/common/util/BigObjectArray.java b/server/src/main/java/org/opensearch/common/util/BigObjectArray.java index c90e74efb1672..6fb5662686a34 100644 --- a/server/src/main/java/org/opensearch/common/util/BigObjectArray.java +++ b/server/src/main/java/org/opensearch/common/util/BigObjectArray.java @@ -42,6 +42,8 @@ /** * Int array abstraction able to support more than 2B values. This implementation slices data into fixed-sized blocks of * configurable length. + * + * @opensearch.internal */ final class BigObjectArray extends AbstractBigArray implements ObjectArray { diff --git a/server/src/main/java/org/opensearch/common/util/BinarySearcher.java b/server/src/main/java/org/opensearch/common/util/BinarySearcher.java index 5807fc192ab62..ca63c170c0ccd 100644 --- a/server/src/main/java/org/opensearch/common/util/BinarySearcher.java +++ b/server/src/main/java/org/opensearch/common/util/BinarySearcher.java @@ -43,6 +43,8 @@ * Refer to {@link BigArrays.DoubleBinarySearcher} for an example. * * NOTE: this class is not thread safe + * + * @opensearch.internal */ public abstract class BinarySearcher { diff --git a/server/src/main/java/org/opensearch/common/util/BitArray.java b/server/src/main/java/org/opensearch/common/util/BitArray.java index 57ad5ae326c03..b75a5d07e70d7 100644 --- a/server/src/main/java/org/opensearch/common/util/BitArray.java +++ b/server/src/main/java/org/opensearch/common/util/BitArray.java @@ -40,6 +40,8 @@ * created from {@link BigArrays}. * The underlying long array grows lazily based on the biggest index * that needs to be set. + * + * @opensearch.internal */ public final class BitArray implements Releasable { private final BigArrays bigArrays; diff --git a/server/src/main/java/org/opensearch/common/util/ByteArray.java b/server/src/main/java/org/opensearch/common/util/ByteArray.java index 0b360148ddc01..44deb7f4fdb5a 100644 --- a/server/src/main/java/org/opensearch/common/util/ByteArray.java +++ b/server/src/main/java/org/opensearch/common/util/ByteArray.java @@ -38,6 +38,8 @@ /** * Abstraction of an array of byte values. + * + * @opensearch.internal */ public interface ByteArray extends BigArray { diff --git a/server/src/main/java/org/opensearch/common/util/ByteUtils.java b/server/src/main/java/org/opensearch/common/util/ByteUtils.java index b0054bc1a06b7..36ae3b1f5bcaa 100644 --- a/server/src/main/java/org/opensearch/common/util/ByteUtils.java +++ b/server/src/main/java/org/opensearch/common/util/ByteUtils.java @@ -32,8 +32,12 @@ package org.opensearch.common.util; -/** Utility methods to do byte-level encoding. These methods are biased towards little-endian byte order because it is the most - * common byte order and reading several bytes at once may be optimizable in the future with the help of sun.mist.Unsafe. */ +/** + * Utility methods to do byte-level encoding. These methods are biased towards little-endian byte order because it is the most + * common byte order and reading several bytes at once may be optimizable in the future with the help of sun.mist.Unsafe. + * + * @opensearch.internal + */ public final class ByteUtils { private ByteUtils() {}; diff --git a/server/src/main/java/org/opensearch/common/util/BytesRefHash.java b/server/src/main/java/org/opensearch/common/util/BytesRefHash.java index 5de58016de372..eb44b30a7e36c 100644 --- a/server/src/main/java/org/opensearch/common/util/BytesRefHash.java +++ b/server/src/main/java/org/opensearch/common/util/BytesRefHash.java @@ -43,6 +43,8 @@ * probing, growth is smooth thanks to {@link BigArrays}, hashes are cached for faster * re-hashing and capacity is always a multiple of 2 for faster identification of buckets. * This class is not thread-safe. + * + * @opensearch.internal */ public final class BytesRefHash extends AbstractHash { diff --git a/server/src/main/java/org/opensearch/common/util/CachedSupplier.java b/server/src/main/java/org/opensearch/common/util/CachedSupplier.java index 647ef46f7a890..f81e57d9fbad6 100644 --- a/server/src/main/java/org/opensearch/common/util/CachedSupplier.java +++ b/server/src/main/java/org/opensearch/common/util/CachedSupplier.java @@ -38,6 +38,8 @@ * A {@link Supplier} that caches its return value. This may be useful to make * a {@link Supplier} idempotent or for performance reasons if always returning * the same instance is acceptable. + * + * @opensearch.internal */ public final class CachedSupplier implements Supplier { 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 f9cb8cc2d60f5..d52d717865dbf 100644 --- a/server/src/main/java/org/opensearch/common/util/CancellableThreads.java +++ b/server/src/main/java/org/opensearch/common/util/CancellableThreads.java @@ -47,6 +47,8 @@ * of cancellation. * * Cancellation policy: This class does not support external interruption via Thread#interrupt(). Always use #cancel() instead. + * + * @opensearch.internal */ public class CancellableThreads { private final Set threads = new HashSet<>(); @@ -186,6 +188,11 @@ public interface IOInterruptible { void run() throws IOException, InterruptedException; } + /** + * Thrown if there is an error cancelling execution + * + * @opensearch.internal + */ public static class ExecutionCancelledException extends OpenSearchException { public ExecutionCancelledException(String msg) { diff --git a/server/src/main/java/org/opensearch/common/util/CollectionUtils.java b/server/src/main/java/org/opensearch/common/util/CollectionUtils.java index 7817e7b29df9a..622efc2074d0a 100644 --- a/server/src/main/java/org/opensearch/common/util/CollectionUtils.java +++ b/server/src/main/java/org/opensearch/common/util/CollectionUtils.java @@ -57,7 +57,11 @@ import java.util.RandomAccess; import java.util.Set; -/** Collections-related utility methods. */ +/** + * Collections-related utility methods. + * + * @opensearch.internal + */ public class CollectionUtils { /** @@ -212,6 +216,11 @@ public static Map copyMap(Map map) { } } + /** + * A rotated list + * + * @opensearch.internal + */ private static class RotatedList extends AbstractList implements RandomAccess { private final List in; diff --git a/server/src/main/java/org/opensearch/common/util/CombinedRateLimiter.java b/server/src/main/java/org/opensearch/common/util/CombinedRateLimiter.java index 6fe67d378c273..451add56b255a 100644 --- a/server/src/main/java/org/opensearch/common/util/CombinedRateLimiter.java +++ b/server/src/main/java/org/opensearch/common/util/CombinedRateLimiter.java @@ -39,6 +39,8 @@ /** * A rate limiter designed for multiple concurrent users. + * + * @opensearch.internal */ public class CombinedRateLimiter { diff --git a/server/src/main/java/org/opensearch/common/util/Comparators.java b/server/src/main/java/org/opensearch/common/util/Comparators.java index 9a5f8d1849e8d..39e57dc5d16ab 100644 --- a/server/src/main/java/org/opensearch/common/util/Comparators.java +++ b/server/src/main/java/org/opensearch/common/util/Comparators.java @@ -36,6 +36,8 @@ /** * {@link Comparator}-related utility methods. + * + * @opensearch.internal */ public enum Comparators { ; diff --git a/server/src/main/java/org/opensearch/common/util/Countable.java b/server/src/main/java/org/opensearch/common/util/Countable.java index ee354421a8633..1adf6d2fb015c 100644 --- a/server/src/main/java/org/opensearch/common/util/Countable.java +++ b/server/src/main/java/org/opensearch/common/util/Countable.java @@ -32,6 +32,11 @@ package org.opensearch.common.util; +/** + * Base countable interface. + * + * @opensearch.internal + */ public interface Countable { int size(); } diff --git a/server/src/main/java/org/opensearch/common/util/CuckooFilter.java b/server/src/main/java/org/opensearch/common/util/CuckooFilter.java index e23b21936dfe3..8ef48c8d6e1a4 100644 --- a/server/src/main/java/org/opensearch/common/util/CuckooFilter.java +++ b/server/src/main/java/org/opensearch/common/util/CuckooFilter.java @@ -74,6 +74,8 @@ * Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies. ACM, 2014. * * https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf + * + * @opensearch.internal */ public class CuckooFilter implements Writeable { diff --git a/server/src/main/java/org/opensearch/common/util/DoubleArray.java b/server/src/main/java/org/opensearch/common/util/DoubleArray.java index f047882c842a5..45e57085dcca4 100644 --- a/server/src/main/java/org/opensearch/common/util/DoubleArray.java +++ b/server/src/main/java/org/opensearch/common/util/DoubleArray.java @@ -34,6 +34,8 @@ /** * Abstraction of an array of double values. + * + * @opensearch.internal */ public interface DoubleArray extends BigArray { diff --git a/server/src/main/java/org/opensearch/common/util/FeatureFlags.java b/server/src/main/java/org/opensearch/common/util/FeatureFlags.java index 34c613f5423d0..0b31e3814667a 100644 --- a/server/src/main/java/org/opensearch/common/util/FeatureFlags.java +++ b/server/src/main/java/org/opensearch/common/util/FeatureFlags.java @@ -12,6 +12,8 @@ * Utility class to manage feature flags. Feature flags are system properties that must be set on the JVM. * These are used to gate the visibility/availability of incomplete features. Fore more information, see * https://featureflags.io/feature-flag-introduction/ + * + * @opensearch.internal */ public class FeatureFlags { diff --git a/server/src/main/java/org/opensearch/common/util/FloatArray.java b/server/src/main/java/org/opensearch/common/util/FloatArray.java index f1744fef83199..b402b8e81aa43 100644 --- a/server/src/main/java/org/opensearch/common/util/FloatArray.java +++ b/server/src/main/java/org/opensearch/common/util/FloatArray.java @@ -34,6 +34,8 @@ /** * Abstraction of an array of double values. + * + * @opensearch.internal */ public interface FloatArray extends BigArray { diff --git a/server/src/main/java/org/opensearch/common/util/IntArray.java b/server/src/main/java/org/opensearch/common/util/IntArray.java index 0beb5e12134ad..4a6e8fe5a6f95 100644 --- a/server/src/main/java/org/opensearch/common/util/IntArray.java +++ b/server/src/main/java/org/opensearch/common/util/IntArray.java @@ -34,6 +34,8 @@ /** * Abstraction of an array of integer values. + * + * @opensearch.internal */ public interface IntArray extends BigArray { diff --git a/server/src/main/java/org/opensearch/common/util/LazyInitializable.java b/server/src/main/java/org/opensearch/common/util/LazyInitializable.java index e302f22bd0aaa..98192796fb920 100644 --- a/server/src/main/java/org/opensearch/common/util/LazyInitializable.java +++ b/server/src/main/java/org/opensearch/common/util/LazyInitializable.java @@ -46,6 +46,8 @@ * {@link Consumer}. On {@code #reset()} the value will be passed to the * onReset {@code Consumer} and the next {@code #getOrCompute()} * will regenerate the value. + * + * @opensearch.internal */ public final class LazyInitializable { diff --git a/server/src/main/java/org/opensearch/common/util/LocaleUtils.java b/server/src/main/java/org/opensearch/common/util/LocaleUtils.java index 47617d198b6b6..c684b1b2d781f 100644 --- a/server/src/main/java/org/opensearch/common/util/LocaleUtils.java +++ b/server/src/main/java/org/opensearch/common/util/LocaleUtils.java @@ -38,6 +38,8 @@ /** * Utilities for for dealing with {@link Locale} objects + * + * @opensearch.internal */ public class LocaleUtils { diff --git a/server/src/main/java/org/opensearch/common/util/LongArray.java b/server/src/main/java/org/opensearch/common/util/LongArray.java index e88c27cb0e856..c794af8504398 100644 --- a/server/src/main/java/org/opensearch/common/util/LongArray.java +++ b/server/src/main/java/org/opensearch/common/util/LongArray.java @@ -34,6 +34,8 @@ /** * Abstraction of an array of long values. + * + * @opensearch.internal */ public interface LongArray extends BigArray { diff --git a/server/src/main/java/org/opensearch/common/util/LongHash.java b/server/src/main/java/org/opensearch/common/util/LongHash.java index 079577b1530a7..71272e79c65b3 100644 --- a/server/src/main/java/org/opensearch/common/util/LongHash.java +++ b/server/src/main/java/org/opensearch/common/util/LongHash.java @@ -40,6 +40,8 @@ * probing, growth is smooth thanks to {@link BigArrays} and capacity is always * a multiple of 2 for faster identification of buckets. * This class is not thread-safe. + * + * @opensearch.internal */ // IDs are internally stored as id + 1 so that 0 encodes for an empty slot public final class LongHash extends AbstractHash { diff --git a/server/src/main/java/org/opensearch/common/util/LongLongHash.java b/server/src/main/java/org/opensearch/common/util/LongLongHash.java index 33777ecc89fb6..1a720eae82a1d 100644 --- a/server/src/main/java/org/opensearch/common/util/LongLongHash.java +++ b/server/src/main/java/org/opensearch/common/util/LongLongHash.java @@ -42,6 +42,8 @@ * linear probing, growth is smooth thanks to {@link BigArrays} and capacity * is always a multiple of 2 for faster identification of buckets. * This class is not thread-safe. + * + * @opensearch.internal */ // IDs are internally stored as id + 1 so that 0 encodes for an empty slot public final class LongLongHash extends AbstractHash { 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 9abd0c9d46682..9b8f9621fb9c1 100644 --- a/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java +++ b/server/src/main/java/org/opensearch/common/util/LongObjectPagedHashMap.java @@ -40,6 +40,8 @@ /** * A hash table from native longs to objects. This implementation resolves collisions * using open-addressing and does not support null values. This class is not thread-safe. + * + * @opensearch.internal */ public class LongObjectPagedHashMap extends AbstractPagedHashMap implements Iterable> { diff --git a/server/src/main/java/org/opensearch/common/util/Maps.java b/server/src/main/java/org/opensearch/common/util/Maps.java index db99ec29d3a2d..08ee2375d1f94 100644 --- a/server/src/main/java/org/opensearch/common/util/Maps.java +++ b/server/src/main/java/org/opensearch/common/util/Maps.java @@ -35,6 +35,11 @@ import java.util.Map; import java.util.Objects; +/** + * Map utility class. + * + * @opensearch.internal + */ public class Maps { /** diff --git a/server/src/main/java/org/opensearch/common/util/ObjectArray.java b/server/src/main/java/org/opensearch/common/util/ObjectArray.java index 7663c53bb5175..142a722821e90 100644 --- a/server/src/main/java/org/opensearch/common/util/ObjectArray.java +++ b/server/src/main/java/org/opensearch/common/util/ObjectArray.java @@ -34,6 +34,8 @@ /** * Abstraction of an array of object values. + * + * @opensearch.internal */ public interface ObjectArray extends BigArray { 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 ae9555902c395..d0f660b9ac445 100644 --- a/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java +++ b/server/src/main/java/org/opensearch/common/util/PageCacheRecycler.java @@ -49,7 +49,11 @@ import static org.opensearch.common.recycler.Recyclers.dequeFactory; import static org.opensearch.common.recycler.Recyclers.none; -/** A recycler of fixed-size pages. */ +/** + * A recycler of fixed-size pages. + * + * @opensearch.internal + */ public class PageCacheRecycler { public static final Setting TYPE_SETTING = new Setting<>( diff --git a/server/src/main/java/org/opensearch/common/util/PlainIterator.java b/server/src/main/java/org/opensearch/common/util/PlainIterator.java index a84e8a064804d..fff8126f13e5d 100644 --- a/server/src/main/java/org/opensearch/common/util/PlainIterator.java +++ b/server/src/main/java/org/opensearch/common/util/PlainIterator.java @@ -36,6 +36,11 @@ import java.util.Iterator; import java.util.List; +/** + * A plain iterator + * + * @opensearch.internal + */ public class PlainIterator implements Iterable, Countable { private final List elements; diff --git a/server/src/main/java/org/opensearch/common/util/SetBackedScalingCuckooFilter.java b/server/src/main/java/org/opensearch/common/util/SetBackedScalingCuckooFilter.java index 474e33ccf29f1..c8e60bddb8d0f 100644 --- a/server/src/main/java/org/opensearch/common/util/SetBackedScalingCuckooFilter.java +++ b/server/src/main/java/org/opensearch/common/util/SetBackedScalingCuckooFilter.java @@ -61,6 +61,8 @@ *

* This datastructure scales as more values are inserted by growing the list of CuckooFilters. * Final size is dependent on the cardinality of data inserted, and the precision specified. + * + * @opensearch.internal */ public class SetBackedScalingCuckooFilter implements Writeable { diff --git a/server/src/main/java/org/opensearch/common/util/SingleObjectCache.java b/server/src/main/java/org/opensearch/common/util/SingleObjectCache.java index dafcff9dfd11d..c2c5613f0f301 100644 --- a/server/src/main/java/org/opensearch/common/util/SingleObjectCache.java +++ b/server/src/main/java/org/opensearch/common/util/SingleObjectCache.java @@ -39,6 +39,8 @@ /** * A very simple single object cache that allows non-blocking refresh calls * triggered by expiry time. + * + * @opensearch.internal */ public abstract class SingleObjectCache { diff --git a/server/src/main/java/org/opensearch/common/util/URIPattern.java b/server/src/main/java/org/opensearch/common/util/URIPattern.java index 2558374dda24b..a3c385e5ea660 100644 --- a/server/src/main/java/org/opensearch/common/util/URIPattern.java +++ b/server/src/main/java/org/opensearch/common/util/URIPattern.java @@ -44,6 +44,8 @@ * * For example: foobar://*.local/some_path/*?*#* will match all uris with schema foobar in local domain * with any port, with path that starts some_path and with any query and fragment. + * + * @opensearch.internal */ public class URIPattern { private final URI uriPattern; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractAsyncTask.java b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractAsyncTask.java index 337fd59cfce7c..7c599476e263d 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractAsyncTask.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractAsyncTask.java @@ -43,6 +43,8 @@ /** * A base class for tasks that need to repeat. + * + * @opensearch.internal */ public abstract class AbstractAsyncTask implements Runnable, Closeable { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractLifecycleRunnable.java b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractLifecycleRunnable.java index c283c5c618390..b55280d43a473 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractLifecycleRunnable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractLifecycleRunnable.java @@ -40,6 +40,8 @@ * {@code AbstractLifecycleRunnable} is a service-lifecycle aware {@link AbstractRunnable}. *

* This simplifies the running and rescheduling of {@link Lifecycle}-based {@code Runnable}s. + * + * @opensearch.internal */ public abstract class AbstractLifecycleRunnable extends AbstractRunnable { /** diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractRunnable.java b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractRunnable.java index 446e563575e7d..3afeb10bcb9fa 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/AbstractRunnable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/AbstractRunnable.java @@ -34,6 +34,8 @@ /** * An extension to runnable. + * + * @opensearch.internal */ public abstract class AbstractRunnable implements Runnable { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/AsyncIOProcessor.java b/server/src/main/java/org/opensearch/common/util/concurrent/AsyncIOProcessor.java index d04982da32704..72cc0f5ee21d2 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/AsyncIOProcessor.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/AsyncIOProcessor.java @@ -49,6 +49,8 @@ * by a single worker. A worker in this context can be any caller of the {@link #put(Object, Consumer)} method since it will * hijack a worker if nobody else is currently processing queued items. If the internal queue has reached it's capacity incoming threads * might be blocked until other items are processed + * + * @opensearch.internal */ public abstract class AsyncIOProcessor { private final Logger logger; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/AtomicArray.java b/server/src/main/java/org/opensearch/common/util/concurrent/AtomicArray.java index efb8fce467a21..dd1f71a7d2166 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/AtomicArray.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/AtomicArray.java @@ -42,6 +42,8 @@ /** * A list backed by an {@link AtomicReferenceArray} with potential null values, easily allowing * to get the concrete values as a list using {@link #asList()}. + * + * @opensearch.internal */ public class AtomicArray { private final AtomicReferenceArray array; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/BaseFuture.java b/server/src/main/java/org/opensearch/common/util/concurrent/BaseFuture.java index 14c6c366f0bb9..fef37299b349d 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/BaseFuture.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/BaseFuture.java @@ -46,6 +46,11 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.locks.AbstractQueuedSynchronizer; +/** + * Base future class. + * + * @opensearch.internal + */ public abstract class BaseFuture implements Future { private static final String BLOCKING_OP_REASON = "Blocking operation"; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentCollections.java b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentCollections.java index 758682fb9ff96..c646d476e17ab 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentCollections.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentCollections.java @@ -43,6 +43,11 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.LinkedTransferQueue; +/** + * Thread safe collection base class. + * + * @opensearch.internal + */ public abstract class ConcurrentCollections { static final int aggressiveConcurrencyLevel; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentHashMapLong.java b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentHashMapLong.java index d93d55d106e6e..6ee1b0a38248a 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentHashMapLong.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentHashMapLong.java @@ -37,6 +37,11 @@ import java.util.Set; import java.util.concurrent.ConcurrentMap; +/** + * Thread safe hash map of longs. + * + * @opensearch.internal + */ public class ConcurrentHashMapLong implements ConcurrentMapLong { private final ConcurrentMap map; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentMapLong.java b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentMapLong.java index fb1c752dd7a55..7656a957dc534 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentMapLong.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ConcurrentMapLong.java @@ -34,6 +34,11 @@ import java.util.concurrent.ConcurrentMap; +/** + * Thread safe long value hash map + * + * @opensearch.internal + */ public interface ConcurrentMapLong extends ConcurrentMap { T get(long key); diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/CountDown.java b/server/src/main/java/org/opensearch/common/util/concurrent/CountDown.java index 23843b9e0c5bf..9dc67ab40dba2 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/CountDown.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/CountDown.java @@ -39,6 +39,8 @@ * A simple thread safe count-down class that in contrast to a {@link CountDownLatch} * never blocks. This class is useful if a certain action has to wait for N concurrent * tasks to return or a timeout to occur in order to proceed. + * + * @opensearch.internal */ public final class CountDown { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/FutureUtils.java b/server/src/main/java/org/opensearch/common/util/concurrent/FutureUtils.java index 50ab3bccf6b90..83fdbf8790eba 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/FutureUtils.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/FutureUtils.java @@ -41,6 +41,11 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +/** + * Future utilities. + * + * @opensearch.internal + */ public class FutureUtils { /** diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/KeyedLock.java b/server/src/main/java/org/opensearch/common/util/concurrent/KeyedLock.java index 5b2cb6c2312fe..9d4235f8d8a1a 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/KeyedLock.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/KeyedLock.java @@ -46,7 +46,8 @@ * infinitely. * Note: this lock is reentrant * - * */ + * @opensearch.internal + */ public final class KeyedLock { private final ConcurrentMap map = ConcurrentCollections.newConcurrentMapWithAggressiveConcurrency(); diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ListenableFuture.java b/server/src/main/java/org/opensearch/common/util/concurrent/ListenableFuture.java index ce6fa0e46d0c0..cc865022e1e8a 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ListenableFuture.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ListenableFuture.java @@ -50,6 +50,8 @@ * for execution in the provided {@link ExecutorService}. If the computation has already * been performed, a request to add a listener will simply result in execution of the listener * on the calling thread. + * + * @opensearch.internal */ public final class ListenableFuture extends BaseFuture implements ActionListener { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchAbortPolicy.java b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchAbortPolicy.java index aa13d1d8f5cb5..fc9a179083f59 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchAbortPolicy.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchAbortPolicy.java @@ -37,6 +37,11 @@ import java.util.concurrent.BlockingQueue; import java.util.concurrent.ThreadPoolExecutor; +/** + * OpenSearch abortion policies. + * + * @opensearch.internal + */ public class OpenSearchAbortPolicy implements XRejectedExecutionHandler { private final CounterMetric rejected = new CounterMetric(); diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java index 5a967528a6ae2..094a356151b78 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java @@ -57,6 +57,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; +/** + * Executors. + * + * @opensearch.internal + */ public class OpenSearchExecutors { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(OpenSearchExecutors.class); @@ -337,6 +342,11 @@ public static ThreadFactory daemonThreadFactory(String namePrefix) { return new OpenSearchThreadFactory(namePrefix); } + /** + * A thread factory + * + * @opensearch.internal + */ static class OpenSearchThreadFactory implements ThreadFactory { final ThreadGroup group; @@ -363,6 +373,11 @@ public Thread newThread(Runnable r) { */ private OpenSearchExecutors() {} + /** + * A scaling queue for executors + * + * @opensearch.internal + */ static class ExecutorScalingQueue extends LinkedTransferQueue { ThreadPoolExecutor executor; @@ -396,6 +411,8 @@ public boolean offer(E e) { /** * A handler for rejected tasks that adds the specified element to this queue, * waiting if necessary for space to become available. + * + * @opensearch.internal */ static class ForceQueuePolicy implements XRejectedExecutionHandler { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchRejectedExecutionException.java b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchRejectedExecutionException.java index aee5bc63d9dbc..74b5e477c36ee 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchRejectedExecutionException.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchRejectedExecutionException.java @@ -34,6 +34,11 @@ import java.util.concurrent.RejectedExecutionException; +/** + * Thrown when an execution is rejected + * + * @opensearch.internal + */ public class OpenSearchRejectedExecutionException extends RejectedExecutionException { private final boolean isExecutorShutdown; 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 a04554f9b029c..2ebf8a1cc970c 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 @@ -42,6 +42,8 @@ /** * An extension to thread pool executor, allowing (in the future) to add specific additional stats to it. + * + * @opensearch.internal */ public class OpenSearchThreadPoolExecutor extends ThreadPoolExecutor { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedCallable.java b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedCallable.java index 93250eea8e75b..806a6e11606df 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedCallable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedCallable.java @@ -35,6 +35,11 @@ import java.util.concurrent.Callable; +/** + * A prioritized callable. + * + * @opensearch.internal + */ public abstract class PrioritizedCallable implements Callable, Comparable { private final Priority priority; @@ -56,6 +61,11 @@ public Priority priority() { return priority; } + /** + * Wrapped generic + * + * @opensearch.internal + */ static class Wrapped extends PrioritizedCallable { private final Callable callable; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java index 797d476017005..d3d0f6080e7f6 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java @@ -53,6 +53,8 @@ * be wrapped and assign a default {@link Priority#NORMAL} priority. *

* Note, if two tasks have the same priority, the first to arrive will be executed first (FIFO style). + * + * @opensearch.internal */ public class PrioritizedOpenSearchThreadPoolExecutor extends OpenSearchThreadPoolExecutor { @@ -198,6 +200,11 @@ protected RunnableFuture newTaskFor(Callable callable) { return new PrioritizedFutureTask<>((PrioritizedCallable) callable, insertionOrder.incrementAndGet()); } + /** + * A pending thread + * + * @opensearch.internal + */ public static class Pending { public final Object task; public final Priority priority; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedRunnable.java b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedRunnable.java index 8a932b799eee6..96a74e44a576a 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedRunnable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedRunnable.java @@ -36,6 +36,11 @@ import java.util.concurrent.TimeUnit; import java.util.function.LongSupplier; +/** + * A base prioritized runnable + * + * @opensearch.internal + */ public abstract class PrioritizedRunnable implements Runnable, Comparable { private final Priority priority; @@ -82,6 +87,11 @@ public Priority priority() { return priority; } + /** + * Wrapped runnable + * + * @opensearch.internal + */ static class Wrapped extends PrioritizedRunnable implements WrappedRunnable { private final Runnable runnable; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/QueueResizingOpenSearchThreadPoolExecutor.java b/server/src/main/java/org/opensearch/common/util/concurrent/QueueResizingOpenSearchThreadPoolExecutor.java index 39561039c5c6f..94306906d8c1e 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/QueueResizingOpenSearchThreadPoolExecutor.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/QueueResizingOpenSearchThreadPoolExecutor.java @@ -48,6 +48,8 @@ /** * An extension to thread pool executor, which automatically adjusts the queue size of the * {@code ResizableBlockingQueue} according to Little's Law. + * + * @opensearch.internal */ public final class QueueResizingOpenSearchThreadPoolExecutor extends OpenSearchThreadPoolExecutor { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ReleasableLock.java b/server/src/main/java/org/opensearch/common/util/concurrent/ReleasableLock.java index afa793b009f15..e1aa6bd5d169a 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ReleasableLock.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ReleasableLock.java @@ -41,6 +41,8 @@ /** * Releasable lock used inside of Engine implementations + * + * @opensearch.internal */ public class ReleasableLock implements Releasable { private final Lock lock; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ResizableBlockingQueue.java b/server/src/main/java/org/opensearch/common/util/concurrent/ResizableBlockingQueue.java index bf8a9c86870fa..7ef40ba2f086e 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/ResizableBlockingQueue.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/ResizableBlockingQueue.java @@ -37,6 +37,8 @@ /** * Extends the {@code SizeBlockingQueue} to add the {@code adjustCapacity} method, which will adjust * the capacity by a certain amount towards a maximum or minimum. + * + * @opensearch.internal */ final class ResizableBlockingQueue extends SizeBlockingQueue { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/RunOnce.java b/server/src/main/java/org/opensearch/common/util/concurrent/RunOnce.java index a2bb53ad909fb..5539b5efa4a1c 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/RunOnce.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/RunOnce.java @@ -36,6 +36,8 @@ /** * Runnable that can only be run one time. + * + * @opensearch.internal */ public class RunOnce implements Runnable { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/SizeBlockingQueue.java b/server/src/main/java/org/opensearch/common/util/concurrent/SizeBlockingQueue.java index d2d50eb95edb1..ad790b8dbd418 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/SizeBlockingQueue.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/SizeBlockingQueue.java @@ -43,6 +43,8 @@ * A size based queue wrapping another blocking queue to provide (somewhat relaxed) capacity checks. * Mainly makes sense to use with blocking queues that are unbounded to provide the ability to do * capacity verification. + * + * @opensearch.internal */ public class SizeBlockingQueue extends AbstractQueue implements BlockingQueue { 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 d844a8f158ea4..02a3b24e028a8 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 @@ -94,6 +94,7 @@ * // previous context is restored on StoredContext#close() * * + * @opensearch.internal */ public final class ThreadContext implements Writeable { @@ -805,6 +806,11 @@ public AbstractRunnable unwrap() { private static final Collector, Set> LINKED_HASH_SET_COLLECTOR = new LinkedHashSetCollector<>(); + /** + * Collector based on a linked hash set + * + * @opensearch.internal + */ private static class LinkedHashSetCollector implements Collector, Set> { @Override public Supplier> supplier() { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/TimedRunnable.java b/server/src/main/java/org/opensearch/common/util/concurrent/TimedRunnable.java index 8aa14d556e8e2..f3bc50a33453b 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/TimedRunnable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/TimedRunnable.java @@ -37,6 +37,8 @@ /** * A class used to wrap a {@code Runnable} that allows capturing the time of the task since creation * through execution as well as only execution time. + * + * @opensearch.internal */ class TimedRunnable extends AbstractRunnable implements WrappedRunnable { private final Runnable original; diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/UncategorizedExecutionException.java b/server/src/main/java/org/opensearch/common/util/concurrent/UncategorizedExecutionException.java index 85f8de915e339..5d99a346f6fb0 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/UncategorizedExecutionException.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/UncategorizedExecutionException.java @@ -37,6 +37,11 @@ import java.io.IOException; +/** + * Thrown when an uncategorized error occurs. + * + * @opensearch.internal + */ public class UncategorizedExecutionException extends OpenSearchException { public UncategorizedExecutionException(String msg, Throwable cause) { diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/WrappedRunnable.java b/server/src/main/java/org/opensearch/common/util/concurrent/WrappedRunnable.java index ee4fe31ffa0b7..9763786ff4aae 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/WrappedRunnable.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/WrappedRunnable.java @@ -31,6 +31,11 @@ package org.opensearch.common.util.concurrent; +/** + * A wrapped runnable. + * + * @opensearch.internal + */ public interface WrappedRunnable extends Runnable { Runnable unwrap(); } diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/XRejectedExecutionHandler.java b/server/src/main/java/org/opensearch/common/util/concurrent/XRejectedExecutionHandler.java index 51d30a7312f8c..c56910348c13b 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/XRejectedExecutionHandler.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/XRejectedExecutionHandler.java @@ -34,6 +34,11 @@ import java.util.concurrent.RejectedExecutionHandler; +/** + * Base handler for rejected executions. + * + * @opensearch.internal + */ public interface XRejectedExecutionHandler extends RejectedExecutionHandler { /** diff --git a/server/src/main/java/org/opensearch/common/util/iterable/Iterables.java b/server/src/main/java/org/opensearch/common/util/iterable/Iterables.java index 788386e9d156c..e3f13fef37a7e 100644 --- a/server/src/main/java/org/opensearch/common/util/iterable/Iterables.java +++ b/server/src/main/java/org/opensearch/common/util/iterable/Iterables.java @@ -40,6 +40,11 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; +/** + * Iterables. + * + * @opensearch.internal + */ public class Iterables { public static Iterable concat(Iterable... inputs) { @@ -47,6 +52,11 @@ public static Iterable concat(Iterable... inputs) { return new ConcatenatedIterable<>(inputs); } + /** + * Concatenated interable + * + * @opensearch.internal + */ static class ConcatenatedIterable implements Iterable { private final Iterable[] inputs; @@ -71,6 +81,11 @@ public static Iterable flatten(Iterable> inputs) { return new FlattenedIterables<>(inputs); } + /** + * A flattened iterable + * + * @opensearch.internal + */ static class FlattenedIterables implements Iterable { private final Iterable> inputs; diff --git a/server/src/main/java/org/opensearch/common/util/set/Sets.java b/server/src/main/java/org/opensearch/common/util/set/Sets.java index 1d7175ad424b2..2dc2fb3175d27 100644 --- a/server/src/main/java/org/opensearch/common/util/set/Sets.java +++ b/server/src/main/java/org/opensearch/common/util/set/Sets.java @@ -49,6 +49,11 @@ import java.util.stream.Collector; import java.util.stream.Collectors; +/** + * OpenSearch sets. + * + * @opensearch.internal + */ public final class Sets { private Sets() {} @@ -114,6 +119,11 @@ public static SortedSet sortedDifference(Set left, Set right) { return left.stream().filter(k -> !right.contains(k)).collect(new SortedSetCollector<>()); } + /** + * A sorted set collector + * + * @opensearch.internal + */ private static class SortedSetCollector implements Collector, SortedSet> { @Override diff --git a/server/src/main/java/org/opensearch/common/xcontent/LoggingDeprecationHandler.java b/server/src/main/java/org/opensearch/common/xcontent/LoggingDeprecationHandler.java index 6ce57857515ab..f390ebee55d79 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/LoggingDeprecationHandler.java +++ b/server/src/main/java/org/opensearch/common/xcontent/LoggingDeprecationHandler.java @@ -44,6 +44,8 @@ * requests. It is much less appropriate when parsing responses from external * sources because it will report deprecated fields back to the user as * though the user sent them. + * + * @opensearch.internal */ public class LoggingDeprecationHandler implements DeprecationHandler { public static final LoggingDeprecationHandler INSTANCE = new LoggingDeprecationHandler(); diff --git a/server/src/main/java/org/opensearch/common/xcontent/ObjectParserHelper.java b/server/src/main/java/org/opensearch/common/xcontent/ObjectParserHelper.java index c833fd5cedebf..d342ee30a5300 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/ObjectParserHelper.java +++ b/server/src/main/java/org/opensearch/common/xcontent/ObjectParserHelper.java @@ -44,6 +44,8 @@ /** * This class provides helpers for {@link ObjectParser} that allow dealing with * classes outside of the xcontent dependencies. + * + * @opensearch.internal */ public final class ObjectParserHelper { diff --git a/server/src/main/java/org/opensearch/common/xcontent/ParseFieldRegistry.java b/server/src/main/java/org/opensearch/common/xcontent/ParseFieldRegistry.java index f2d1c815d70a9..bb69a43e714dc 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/ParseFieldRegistry.java +++ b/server/src/main/java/org/opensearch/common/xcontent/ParseFieldRegistry.java @@ -42,6 +42,8 @@ /** * Registry for looking things up using ParseField semantics. + * + * @opensearch.internal */ public class ParseFieldRegistry { private final Map> registry = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/common/xcontent/StatusToXContentObject.java b/server/src/main/java/org/opensearch/common/xcontent/StatusToXContentObject.java index 45d41bca95e5a..8eedd5fb468bb 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/StatusToXContentObject.java +++ b/server/src/main/java/org/opensearch/common/xcontent/StatusToXContentObject.java @@ -36,6 +36,8 @@ /** * Objects that can both render themselves in as json/yaml/etc and can provide a {@link RestStatus} for their response. Usually should be * implemented by top level responses sent back to users from REST endpoints. + * + * @opensearch.internal */ public interface StatusToXContentObject extends ToXContentObject { diff --git a/server/src/main/java/org/opensearch/common/xcontent/SuggestingErrorOnUnknown.java b/server/src/main/java/org/opensearch/common/xcontent/SuggestingErrorOnUnknown.java index 0fd473f47acf6..f765045bf274b 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/SuggestingErrorOnUnknown.java +++ b/server/src/main/java/org/opensearch/common/xcontent/SuggestingErrorOnUnknown.java @@ -42,6 +42,11 @@ import static java.util.stream.Collectors.toList; +/** + * Utility for suggesting source of errors. + * + * @opensearch.internal + */ public class SuggestingErrorOnUnknown implements ErrorOnUnknown { @Override public String errorMessage(String parserName, String unknownField, Iterable candidates) { diff --git a/server/src/main/java/org/opensearch/common/xcontent/XContentHelper.java b/server/src/main/java/org/opensearch/common/xcontent/XContentHelper.java index d0eca4228d153..e4b35d6ee2753 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/XContentHelper.java +++ b/server/src/main/java/org/opensearch/common/xcontent/XContentHelper.java @@ -51,6 +51,11 @@ import java.util.Map; import java.util.Objects; +/** + * Helper for xcontent utilities. + * + * @opensearch.internal + */ @SuppressWarnings("unchecked") public class XContentHelper { diff --git a/server/src/main/java/org/opensearch/common/xcontent/XContentOpenSearchExtension.java b/server/src/main/java/org/opensearch/common/xcontent/XContentOpenSearchExtension.java index 214b35c13c7cd..f90f180f1eb4f 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/XContentOpenSearchExtension.java +++ b/server/src/main/java/org/opensearch/common/xcontent/XContentOpenSearchExtension.java @@ -73,6 +73,8 @@ * SPI extensions for OpenSearch-specific classes (like the Lucene or Joda * dependency classes) that need to be encoded by {@link XContentBuilder} in a * specific way. + * + * @opensearch.internal */ public class XContentOpenSearchExtension implements XContentBuilderExtension { diff --git a/server/src/main/java/org/opensearch/common/xcontent/XContentParserUtils.java b/server/src/main/java/org/opensearch/common/xcontent/XContentParserUtils.java index 822210ffc1898..6848bbc639ec5 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/XContentParserUtils.java +++ b/server/src/main/java/org/opensearch/common/xcontent/XContentParserUtils.java @@ -44,6 +44,8 @@ /** * A set of static methods to get {@link Token} from {@link XContentParser} * while checking for their types and throw {@link ParsingException} if needed. + * + * @opensearch.internal */ public final class XContentParserUtils { diff --git a/server/src/main/java/org/opensearch/common/xcontent/support/XContentMapValues.java b/server/src/main/java/org/opensearch/common/xcontent/support/XContentMapValues.java index 5eb4b782b3f4a..9170cfaf8eadf 100644 --- a/server/src/main/java/org/opensearch/common/xcontent/support/XContentMapValues.java +++ b/server/src/main/java/org/opensearch/common/xcontent/support/XContentMapValues.java @@ -50,6 +50,11 @@ import java.util.Map; import java.util.function.Function; +/** + * Map values for xcontent parsing. + * + * @opensearch.internal + */ public class XContentMapValues { /** diff --git a/server/src/main/java/org/opensearch/snapshots/InternalSnapshotsInfoService.java b/server/src/main/java/org/opensearch/snapshots/InternalSnapshotsInfoService.java index 2314cbd11dfdd..10328d3e2ce9f 100644 --- a/server/src/main/java/org/opensearch/snapshots/InternalSnapshotsInfoService.java +++ b/server/src/main/java/org/opensearch/snapshots/InternalSnapshotsInfoService.java @@ -67,6 +67,11 @@ import java.util.Set; import java.util.function.Supplier; +/** + * Information service for snapshots + * + * @opensearch.internal + */ public class InternalSnapshotsInfoService implements ClusterStateListener, SnapshotsInfoService { public static final Setting INTERNAL_SNAPSHOT_INFO_MAX_CONCURRENT_FETCHES_SETTING = Setting.intSetting( @@ -358,6 +363,12 @@ private static Set listOfSnapshotShards(final ClusterState state) return Collections.unmodifiableSet(snapshotShards); } + /** + * A snapshot of a shard + * + * @opensearch.internal + */ + public static class SnapshotShard { private final Snapshot snapshot; diff --git a/server/src/main/java/org/opensearch/snapshots/RestoreService.java b/server/src/main/java/org/opensearch/snapshots/RestoreService.java index a95c711870e9b..3bdda9413cfd9 100644 --- a/server/src/main/java/org/opensearch/snapshots/RestoreService.java +++ b/server/src/main/java/org/opensearch/snapshots/RestoreService.java @@ -800,6 +800,11 @@ public RestoreInfo getRestoreInfo() { } } + /** + * Updates based on restore progress + * + * @opensearch.internal + */ public static class RestoreInProgressUpdater extends RoutingChangesObserver.AbstractRoutingChangesObserver { // Map of RestoreUUID to a of changes to the shards' restore statuses private final Map> shardChanges = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/snapshots/SnapshotInfo.java b/server/src/main/java/org/opensearch/snapshots/SnapshotInfo.java index f08a52a4e7523..d7ebba721a52c 100644 --- a/server/src/main/java/org/opensearch/snapshots/SnapshotInfo.java +++ b/server/src/main/java/org/opensearch/snapshots/SnapshotInfo.java @@ -103,6 +103,11 @@ public final class SnapshotInfo implements Comparable, ToXContent, private static final Comparator COMPARATOR = Comparator.comparing(SnapshotInfo::startTime) .thenComparing(SnapshotInfo::snapshotId); + /** + * Builds snapshot information + * + * @opensearch.internal + */ public static final class SnapshotInfoBuilder { private String snapshotName = null; private String snapshotUUID = null;