diff --git a/server/src/main/java/org/opensearch/common/AsyncBiFunction.java b/server/src/main/java/org/opensearch/common/AsyncBiFunction.java index 916a0c09cf8..12e63776827 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 @@ import org.opensearch.action.ActionListener; /** * 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 1dc13358482..50c15bb7a95 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 @@ import java.util.function.BiConsumer; /** * 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 057c189e2ce..100588eb6d9 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 @@ package org.opensearch.common; /** * 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 8ef1b026c79..30991469010 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 @@ import java.util.function.Supplier; /** * 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 5a59e6f9862..1b297639aff 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 @@ package org.opensearch.common; 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 8607ba49415..66e079c461e 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 @@ import java.util.Objects; * 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 4c38483329d..a6c236fe4fa 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 @@ import java.util.concurrent.atomic.AtomicLong; /** * 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 8de38292e4c..12a693d6ee5 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 @@ import java.util.Objects; /** * 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 f9a7572afa2..1e2d9b87281 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 @@ import java.util.concurrent.atomic.AtomicInteger; * 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 94347c47e56..ce2bd2f21ce 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 @@ import java.util.Locale; *

* 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 abstract class LocalTimeOffset { /** * How to get instances of {@link LocalTimeOffset}. + * + * @opensearch.internal */ public abstract static class Lookup { /** @@ -234,6 +238,11 @@ public abstract class LocalTimeOffset { 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 @@ public abstract class LocalTimeOffset { } } + /** + * 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 abstract class LocalTimeOffset { } } + /** + * 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 @@ public abstract class LocalTimeOffset { } } + /** + * 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 @@ public abstract class LocalTimeOffset { } } + /** + * 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 abstract class LocalTimeOffset { /** * 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 abstract class LocalTimeOffset { /** * 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 abstract class LocalTimeOffset { } } + /** + * 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 244d3032d23..db51cc64c5d 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.NetworkInterface; 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 c48cbfaedd7..a0e98d91266 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 @@ import static java.util.Objects.requireNonNull; /** * 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 e2f5cdc0ab2..7a87cd58b0e 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 @@ import java.math.BigInteger; /** * 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 31129eaf1d8..02ae1cb0717 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 @@ import java.io.IOException; * 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 ed3a3c1deb3..7033b63d38b 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 @@ import java.nio.file.StandardOpenOption; /** * 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 908e19057e2..aadaa695324 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 org.opensearch.common.io.stream.StreamOutput; 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 e8b79f33f23..fdc53d8335c 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.Arrays; 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 419a85cd973..2c60e848b9d 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 @@ import java.util.concurrent.ThreadLocalRandom; * 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 eb6737530a2..f5ca75882ea 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 @@ import java.util.concurrent.TimeUnit; * 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 abstract class Rounding implements Writeable { return new Builder(interval); } + /** + * Builder for rounding + * + * @opensearch.internal + */ public static class Builder { private final DateTimeUnit unit; @@ -426,6 +433,11 @@ public abstract class Rounding implements Writeable { } } + /** + * Rounding time units + * + * @opensearch.internal + */ static class TimeUnitRounding extends Rounding { static final byte ID = 1; @@ -887,6 +899,11 @@ public abstract class Rounding implements Writeable { } } + /** + * Rounding time intervals + * + * @opensearch.internal + */ static class TimeIntervalRounding extends Rounding { static final byte ID = 2; @@ -1204,6 +1221,11 @@ public abstract class Rounding implements Writeable { } } + /** + * Rounding offsets + * + * @opensearch.internal + */ static class OffsetRounding extends Rounding { static final byte ID = 3; @@ -1315,6 +1337,8 @@ public abstract class Rounding implements Writeable { /** * 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 37076f8f4e6..14844293b32 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 @@ package org.opensearch.common; 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 973277fae65..53b6da4a3bf 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 @@ import java.util.concurrent.TimeUnit; * 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 class StopWatch { /** * 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 139ace6c481..cbf12f264ee 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 java.util.function.Supplier; 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 d93743e03f9..75d3b63a184 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 @@ import java.lang.annotation.Target; /** * 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 ff32faeb94e..9c3462e7077 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 java.util.concurrent.TimeUnit; import static java.util.Collections.emptyMap; +/** + * A table. + * + * @opensearch.internal + */ public class Table { private List headers = new ArrayList<>(); @@ -224,6 +229,11 @@ public class Table { 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 f76f739787f..b00a4383b38 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 @@ import java.util.concurrent.atomic.AtomicLong; * 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 2a41b73ad53..f98276b6d00 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 @@ package org.opensearch.common; * @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 2ce82eb49aa..7b1bbece686 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 @@ package org.opensearch.common; * @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 bf94d8346e8..8705f415216 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 @@ package org.opensearch.common; /** * 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 5ddb628c237..a04a1043025 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 org.opensearch.common.settings.SecureString; 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 979d2be5ae1..09e4344df1b 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 @@ import java.util.List; /** * 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 bdc1d567599..ac38768c9f3 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 @@ import java.util.Map; /** * 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 52b103eaf79..37c70365b6a 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 @@ package org.opensearch.common.blobstore; /** * 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 24aee647e7a..d5242fd5e73 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 @@ import java.util.List; /** * 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 42a347d3788..ab40b1e2a08 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 @@ import java.util.Map; /** * 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 a71a686dbd0..71786bb8e80 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 org.opensearch.common.io.stream.StreamInput; 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 1a6577cbbb2..3b424c582eb 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 @@ package org.opensearch.common.blobstore; /** * 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 0fd20e6bb49..940192d7763 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 @@ import static java.util.Collections.unmodifiableMap; * 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 346100ccb95..f25a741b93c 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.io.IOException; 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 ec498404c88..de167b0a242 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 @@ import org.opensearch.common.blobstore.BlobPath; /** * 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 1cf50027b29..1965aee7f7e 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.Map; 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 a97566fd3fc..8d2aee199ea 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 @@ package org.opensearch.common.blobstore.support; 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 7698771f511..923f592c6bc 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 @@ import java.util.concurrent.atomic.AtomicLong; /** * Breaker that will check a parent's when incrementing + * + * @opensearch.internal */ public class ChildMemoryCircuitBreaker implements CircuitBreaker { @@ -268,6 +270,11 @@ public class ChildMemoryCircuitBreaker implements CircuitBreaker { 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 ca6c5aa9698..8eaf7aba999 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 @@ import java.util.Locale; /** * 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 8983ad3b46e..ee9977bfa2e 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 @@ import java.io.IOException; /** * 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 aa6f3769a07..ddd72280faa 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 @@ package org.opensearch.common.breaker; /** * 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 77ee4df7da2..24e200c2da2 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.IOException; 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 69f715856c6..aac34b991d1 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.IOException; 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 1107eda4b5a..3e0623bf8d1 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 @@ import java.util.ArrayList; /** * 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 2a989e33e91..2d505d14124 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 @@ import java.util.Objects; * 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 f9a2c6b95c0..b7439853f11 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 @@ import java.io.IOException; /** * 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 e9a9b96ea81..28c3f4c9d53 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 @@ import java.util.Objects; * {@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 9ed47ef6cbf..5989e2fab88 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 @@ import java.io.OutputStream; /** * 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 8ab0bc9114c..007b1bfd3cf 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 @@ import java.util.function.ToLongBiFunction; * * @param The type of the keys * @param The type of the values + * + * @opensearch.internal */ public class Cache { @@ -173,6 +175,11 @@ public class Cache { DELETED } + /** + * Entry in a cache + * + * @opensearch.internal + */ static class Entry { final K key; final V value; @@ -196,6 +203,8 @@ public class Cache { * * @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 @@ public class Cache { } } + /** + * 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 class Cache { 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 9fd340ccca3..b6d7979aa41 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 org.opensearch.common.unit.TimeValue; 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 721a1a98855..3c80fe5d66d 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 eb84108319b..369313f9f93 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 89ab6decff4..f8dc8fa4a6d 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 5066ffa76ba..5ce77cdc75f 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 @@ import java.util.stream.Stream; * 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 final class CopyOnWriteHashMap extends AbstractMap { /** * Abstraction of a node, implemented by both inner and leaf nodes. + * + * @opensearch.internal */ private abstract static class Node { @@ -124,6 +128,8 @@ public final class CopyOnWriteHashMap extends AbstractMap { /** * 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 final class CopyOnWriteHashMap extends AbstractMap { * * 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 @@ public final class CopyOnWriteHashMap extends AbstractMap { } + /** + * 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 fd2c23af30e..3d505b8c38a 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 @@ import java.util.Queue; * 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 55696568de4..7d78b714210 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 com.carrotsearch.hppc.cursors.ObjectCursor; 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 a5ebb194237..0bff76e7ec9 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 @@ import java.util.Map; *

* 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 final class ImmutableOpenIntMap implements Iterable(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 82b9afd1d3c..77716c951c5 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 @@ import java.util.Map; *

* 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 final class ImmutableOpenMap implements Iterable(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 a76f4246b17..9536bbb1ba4 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 class 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 39e95d46e3a..7a28f02ab4b 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 java.util.Map; 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 cae81cb0931..837f8af44bf 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.io.UncheckedIOException; 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 afeb3c97cc0..b0db6435d61 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 @@ package org.opensearch.common.component; * // 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 d0691c54dc2..984d55df1bd 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 @@ package org.opensearch.common.component; 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 dedf9a48997..89c344b955b 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 f15e213b9a7..9400955f87a 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 @@ import java.util.zip.CheckedOutputStream; * 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 b5116598ea4..4f55010be2f 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.IOException; 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 79d785296f9..cb30f11fa41 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 org.opensearch.common.xcontent.XContentType; 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 b622ac6d3f6..05c5250ee32 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 @@ import java.util.zip.InflaterOutputStream; /** * {@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 eedb3c0b9ac..7f070e0b499 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 e06b6ee96ab..e17676fc1c5 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 @@ package org.opensearch.common.compress; 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 795d3525428..926eb9cb6fd 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 @@ import org.opensearch.common.util.concurrent.RefCounted; /** * 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 467b5e4cfb3..8bf620ee2cd 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 @@ import java.io.IOException; * 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 76625094f3c..b7ddd755503 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 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * 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 975f2295d7c..f7121377940 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 @@ import org.opensearch.common.util.concurrent.AbstractRefCounted; * 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 9c6be10e5ea..20c454f9442 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 @@ import static org.opensearch.common.xcontent.XContentParserUtils.parseFieldsValu * * @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 7413c27e63d..6cf7a009648 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 @@ import java.util.Objects; /** * 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 f21caaff4a0..1c282330493 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 @@ import java.util.Locale; /** * 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 529126c4624..dcce4575039 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 final class GeoJson { }); } + /** + * 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 26844d8b5c0..5d93aec870c 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 org.opensearch.geometry.Geometry; 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 dea59d042f3..e380e6a9e68 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 @@ import static org.opensearch.common.geo.GeoUtils.normalizePoint; /** * 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 a272228af5a..a2b06dccded 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 java.util.Locale; 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 6577b10403f..bf2192a28a2 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 @@ import static org.opensearch.common.geo.GeoUtils.normalizeLon; /** * 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 7b2e90d8ed6..af96566ebc4 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 @@ import java.util.Map; /** * 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 ac248f6bb6d..7a59c7a0801 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 @@ import org.opensearch.geometry.Rectangle; /** * 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 1585e6cf2ad..9cff3e56b56 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 org.opensearch.index.fielddata.SortingNumericDoubleValues; 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 c907ee722c1..b759def6785 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 @@ import java.text.ParseException; /** * 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 113e7a6e9fa..09bebda5004 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 @@ import java.util.Locale; /** * 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 f1fc1f9a1b1..e8c1be616ba 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 @@ import java.util.Map; /** * 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 96ffe19129d..19b508734c2 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 @@ import java.util.Locale; /** * 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 f1a9638e998..abf7e7effb4 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 5eda2471e73..89bba47fc65 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 org.opensearch.common.io.stream.Writeable; 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 84d12d2ebb5..f73c94057da 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 org.opensearch.geometry.utils.WellKnownText; 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 e505a804e79..e97bf69eae7 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 @@ import java.util.List; /** * 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 fb773ed6654..3b64c647df1 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 org.opensearch.common.xcontent.XContentBuilder; 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 9c727830623..0892e9bd57c 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 @@ import java.util.List; * 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 5513d9912b9..2bb4ce0472a 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 org.opensearch.common.xcontent.XContentBuilder; 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 09fec96e0e6..8ff56111837 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.ArrayList; 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 ae7075ff7bb..fc9548a4d90 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.ArrayList; 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 9e303b8de2a..64ca4aae326 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.Iterator; 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 29ec72f4755..7d5fb4b1c8d 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.ArrayList; 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 ac78c09c91b..27fc84d229d 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.List; 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 86878f736d6..885733cde58 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 org.locationtech.spatial4j.shape.Point; 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 5abc01e5aad..0341d2a1af3 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 @@ import static org.apache.lucene.geo.GeoUtils.orient; * 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 afd57ad6ab5..4e752440095 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 @@ import java.util.Objects; /** * 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 c4c091b0e25..24040813255 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 @@ import java.util.List; *

* 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 45ad538187f..28feb0d5c2e 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 @@ import java.util.List; * 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 7aa5b0a165f..adccedae881 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 @@ import java.util.List; * * 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 f2670fd4eff..c8f3db84ba6 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 @@ import java.util.Collections; /** * 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 c2a29482833..f53f60a3a97 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 @@ import java.util.Objects; * 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 f8b8b92027b..8ba0bd7ee1b 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 @@ import java.util.Objects; /** * 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 da0473dd25e..7d2b65c23b6 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 @@ import java.util.Objects; * * * @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 53010c50baf..bc9624b9a13 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 @@ import java.util.List; * 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 3782734b0d9..a733a19608a 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 @@ import java.lang.annotation.Annotation; * @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 d40aec8a25d..53d02e37502 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 @@ import org.opensearch.common.inject.spi.Element; * @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 183ee13db16..430b204c3e6 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * * @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 2635ead8d7f..1dd3c83b147 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 @@ import static org.opensearch.common.util.set.Sets.newHashSet; * * @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 ba73fbb0848..687da29eb27 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 @@ import org.opensearch.common.inject.spi.Dependency; /** * 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 b62fe8f7535..4379a934825 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 @@ import static org.opensearch.common.util.set.Sets.newHashSet; * * @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 2b1c6aa2582..935448d8115 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.internal.ToStringBuilder; 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 6a8ca2ac820..7d30e3307d5 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 @@ import java.lang.reflect.InvocationTargetException; * {@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 f84f7c03a2c..5b1a3f453d2 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 @@ package org.opensearch.common.inject; * 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 5f8458e76d3..8027ff74a4e 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 org.opensearch.common.inject.spi.InjectionPoint; 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 @@ class ConstructorBindingImpl extends BindingImpl implements ConstructorBin .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 a83eed858fb..ff8806d1fda 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 @@ import java.util.Set; * 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 d06896c2b42..220de16201c 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 @@ import org.opensearch.common.inject.spi.InjectionPoint; * 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 0e8404898aa..22afccdaf12 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.ErrorsException; 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 9ab1c882e9d..8b2271ba363 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 @@ import java.util.Collection; * 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 cdc6bf36034..146398714b7 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 @@ import java.lang.reflect.InvocationTargetException; * 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 20a437e0a80..9004cba954b 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 @@ import java.util.List; * 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 296a176ab83..39b9574b62b 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.Collections; 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 65f7f303771..204d74ca096 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @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 3983984470c..9a07bcf1adc 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 @@ import org.opensearch.common.inject.spi.PrivateElements; /** * 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 97146198e4b..ffb1873efc1 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 @@ import org.opensearch.common.inject.spi.Dependency; /** * 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 1ffdd5267fd..6513f720bea 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 @@ import java.util.Arrays; * } * } * + * + * @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 05df90d9dba..1d0fec8033f 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 a25017ab9a2..dc31de4e200 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 java.util.Objects; 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 779d50bbfce..9dbc26645fa 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 @@ import org.opensearch.common.inject.internal.ErrorsException; * 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 4ace6a059c8..6d1d5b88e43 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.Errors; 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 8b333f7ac29..e806eba6df7 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 @@ import java.util.concurrent.CountDownLatch; * {@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 658d5dcd1ae..0c58238459d 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 63740859ba0..062e1bb1257 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 @@ import java.util.Set; * @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 adf8a6c742f..ff212c63133 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 @@ import java.util.List; * * @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 944ff64d508..3dd858356ba 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 @@ import java.util.List; * * @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 439ce8fbae3..c01f155c399 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 @@ import static org.opensearch.common.inject.internal.Annotations.findScopeAnnotat * * @author crazybob@google.com (Bob Lee) * @see InjectorBuilder + * + * @opensearch.internal */ class InjectorImpl implements Injector, Lookups { final State state; @@ -199,6 +201,11 @@ class InjectorImpl implements Injector, Lookups { 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 @@ class InjectorImpl implements Injector, Lookups { } } + /** + * 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 @@ class InjectorImpl implements Injector, Lookups { 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 0af8aa5a895..006d39b6d83 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 @@ import static org.opensearch.common.inject.Scopes.SINGLETON; * of injectors in batch. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ class InjectorShell { @@ -77,6 +79,11 @@ class InjectorShell { 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 @@ class InjectorShell { ); } + /** + * The factory for the injector + * + * @opensearch.internal + */ private static class InjectorFactory implements InternalFactory, Provider { private final Injector injector; @@ -259,6 +271,11 @@ class InjectorShell { ); } + /** + * 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 @@ class InjectorShell { } } + /** + * 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 3eb40b8d567..9925418c34a 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 org.opensearch.common.inject.spi.Dependency; 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 d36791c1544..56730cbfa49 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 @@ import java.util.Objects; * 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 class Key { } } + /** + * Strategy for an annotation + * + * @opensearch.internal + */ // this class not test-covered static class AnnotationInstanceStrategy implements AnnotationStrategy { @@ -461,6 +468,11 @@ public class Key { } } + /** + * 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 153dad9ce0c..c9d1546ca9e 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 @@ import org.opensearch.common.inject.spi.ProviderLookup; * * @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 798a665cdb3..241bae07221 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 @@ package org.opensearch.common.inject; * 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 132616ac35a..891762375d5 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 @@ package org.opensearch.common.inject; * @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 507b21f872b..47eca6840b3 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 @@ import static java.util.stream.Collectors.toSet; * 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 207803abe6d..c63460d1a9a 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 @@ import java.util.Set; * 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 e2f06cfeaf1..f81babc8030 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 @@ import org.opensearch.common.inject.spi.Message; * * @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 49a12714c8d..b1fc031192e 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 @@ package org.opensearch.common.inject; * 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 0ad304ad90d..55fc263ffc5 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.Collections; 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 ed222d014fb..bf1d25498fb 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 @@ package org.opensearch.common.inject; * * @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 48778fd7829..e34e564d8e2 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 @@ package org.opensearch.common.inject; * 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 22e334a52c9..87635880e29 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 @@ import org.opensearch.common.inject.binder.AnnotatedElementBuilder; * * @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 103fb2f9049..b1a97b8defc 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 @@ import java.util.List; * 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 df47d5eb261..09c02c944c3 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 @@ import org.opensearch.common.inject.spi.Message; * * @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 4a8c9dece95..b6879a9ea3d 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 96c08d1f943..97f9e9ae503 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 @@ package org.opensearch.common.inject; * * @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 f67b601ca86..c90d4dcf746 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.internal.InternalFactory; 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 694816b9716..5620b30774a 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @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 122777f550c..452e7982ddc 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 @@ import static org.opensearch.common.util.set.Sets.newHashSet; * @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 f835b3ea41d..296ac9a63a1 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 97017e997ae..a21495f522d 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 @@ package org.opensearch.common.inject; * 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 88ed5902555..5617112fb30 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * * @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 77a5f920746..f36172ecd17 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 @@ import java.util.Objects; * * @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 a3821fdc7fa..557455b31b0 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 @@ import java.util.Locale; * 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 8a6e1e446fc..3d02213c743 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 @@ import java.lang.reflect.Field; /** * 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 009fbcfb112..d26ed98ef91 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 @@ import org.opensearch.common.inject.spi.InjectionPoint; /** * 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 6ca2b1b367f..600b9539640 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 @@ import java.lang.reflect.Modifier; /** * 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 7fa6cd1d5df..cc6636d35c6 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 @@ import org.opensearch.common.inject.spi.Dependency; /** * 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 d3d894e2d6c..29c743ae47e 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * (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 befb6409d74..d5996bd1363 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 @@ package org.opensearch.common.inject; * 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 560824c0657..3d90737f40d 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 @@ import static java.util.Collections.emptySet; * 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 07b46280449..abe8a24eead 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 @@ import java.lang.reflect.Type; * * @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 07916ccb1ae..64a47ab97cb 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 @@ import org.opensearch.common.inject.spi.TypeListenerBinding; * 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 6fb267a911f..48b33d9df5f 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 @@ import static org.opensearch.common.inject.internal.MoreTypes.canonicalize; * * @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 7ad49a7b975..44e3864d991 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 @@ import java.util.Set; * 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 656260952c5..8379458a8c0 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * * @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 663a859402a..989eb262741 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 @@ import java.util.Set; * * @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 4f2d9b79151..976c148f952 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 6f288a0c4c9..e7eb2fcc472 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 @@ import static java.util.Collections.unmodifiableSet; * @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 8f8df0a2ac3..960fc079e64 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 @@ import java.lang.reflect.Type; * * @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 0f48371a89e..12474dfceb6 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 @@ import java.util.List; * * @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 0a6aacb79ab..bcd593a8cbf 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 @@ import java.lang.annotation.Annotation; * 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 11e11e3b8cf..42c208a2b37 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 @@ import java.lang.annotation.Annotation; * 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 b63e25b1baa..f2d0916790b 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 @@ import java.lang.annotation.Annotation; * * @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 b03c2a937f3..595c477d3e2 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 @@ package org.opensearch.common.inject.binder; /** * 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 708a2d63251..2368fef1647 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 @@ import org.opensearch.common.inject.TypeLiteral; * 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 cd52cd8e574..73dd4414f17 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 @@ import java.lang.annotation.Annotation; * 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 a6622a3e6af..ba7951894b8 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 @@ import java.util.Objects; * 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 3b83bd9693d..1d61acad603 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 @@ import java.lang.reflect.Member; * 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 d4927adafc2..9f5f0dc4a7b 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 @@ import static java.util.Collections.unmodifiableSet; * 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 0365158d024..1004398e844 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.ElementVisitor; 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 62108baaea3..53883e8c4b8 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 @@ import static java.util.Collections.emptySet; * 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 58988f16b1d..63ae0584fde 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 @@ import java.util.List; * 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 class ConstructionContext { } } + /** + * 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 cf3d3eaddc5..283c8c46840 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 @@ import org.opensearch.common.inject.spi.Message; * 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 3a2a1b980c1..86d7ef2a2ca 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 @@ import static java.util.Collections.unmodifiableList; * 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 final class Errors { 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 555ec2bddbe..d472305ce86 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 @@ package org.opensearch.common.inject.internal; * 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 0c838e0a574..ab9d67a6a24 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 @@ import java.util.Timer; /** * 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 d70892ee92e..18d55ce7036 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 java.util.Set; 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 46585b02ab0..792c208d872 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 @@ import java.util.Objects; /** * 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 0c8495df8dd..a5d57f94cb6 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 @@ import java.util.concurrent.ConcurrentHashMap; * 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 3b6741bbbca..22b1c8dd1cf 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 java.util.Set; 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 79dc11677e0..7cde5c6a35f 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 @@ import java.util.Map; * 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 8d8e919cae8..d7b8a5a4f49 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 @@ import org.opensearch.common.inject.spi.Dependency; * 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 2c03d582e53..f81ec7517d4 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.Key; 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 80ae73cd4c2..5c8be66b211 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.Provider; 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 4d744f2634d..53051044b2f 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 org.opensearch.common.inject.spi.TypeConverter; 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 ce215b38677..5ccdc0c5990 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 @@ import static java.util.Collections.unmodifiableMap; * public {@code Types} API. * * @author jessewilson@google.com (Jesse Wilson) + * + * @opensearch.internal */ public class MoreTypes { @@ -432,6 +434,11 @@ public class MoreTypes { 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 class MoreTypes { } } + /** + * Implementation for a generic array + * + * @opensearch.internal + */ public static class GenericArrayTypeImpl implements GenericArrayType, CompositeType { private final Type componentType; @@ -547,6 +559,8 @@ public class MoreTypes { * 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 @@ public class MoreTypes { * 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 ecc7d5f9f5b..1f968adfe57 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 @@ import java.lang.annotation.Annotation; * 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 c8cd137bdf5..46caeeebc8c 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 java.util.Set; 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 96f4b064417..b74429fe672 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 java.util.Set; 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 8acbc663aca..5368eaee753 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 @@ import java.util.Set; * 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 e34a338fdc4..0ca911d4d9b 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 @@ import static java.util.Collections.unmodifiableSet; * * @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 cda8d6e41a1..da0601fd914 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 @@ import java.lang.annotation.Annotation; * 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 0ff1c6bef35..e7e2afe35aa 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 @@ import static java.util.Collections.unmodifiableSet; * 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 f0335639e9b..2c0e67351df 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 @@ import java.lang.reflect.Member; * 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 c35c4334fb6..61038306f48 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 @@ import java.util.logging.Logger; * 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 5ad1e96c319..97004ce6dd3 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 @@ package org.opensearch.common.inject.internal; * 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 2953f2430df..d9af7632229 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 @@ import java.util.Map; * 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 6b5e859258c..3c037f7cd55 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 java.util.concurrent.atomic.AtomicInteger; 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 9e2c148ec79..a4a472a061f 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.BindingTargetVisitor; 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 c6c77cb62f4..9d9c3ec490b 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 @@ package org.opensearch.common.inject.matcher; * 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 abstract class AbstractMatcher implements Matcher { 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 abstract class AbstractMatcher implements Matcher { } } + /** + * 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 090a8ef63fc..21bb63cfef0 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 @@ package org.opensearch.common.inject.matcher; * 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 dd997e0168f..e33e7f32ee5 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 @@ import java.util.Objects; * 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 class Matchers { 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 class Matchers { return new Not<>(p); } + /** + * A NOT Matcher + * + * @opensearch.internal + */ private static class Not extends AbstractMatcher { final Matcher delegate; @@ -121,6 +133,11 @@ public class Matchers { return new AnnotatedWithType(annotationType); } + /** + * An annotated with type + * + * @opensearch.internal + */ private static class AnnotatedWithType extends AbstractMatcher { private final Class annotationType; @@ -158,6 +175,11 @@ public class Matchers { 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 class Matchers { return new SubclassesOf(superclass); } + /** + * A subclass matcher + * + * @opensearch.internal + */ private static class SubclassesOf extends AbstractMatcher { private final Class superclass; @@ -231,6 +258,11 @@ public class Matchers { return new Only(value); } + /** + * ONLY matcher + * + * @opensearch.internal + */ private static class Only extends AbstractMatcher { private final Object value; @@ -266,6 +298,11 @@ public class Matchers { return new IdenticalTo(value); } + /** + * Identical matcher + * + * @opensearch.internal + */ private static class IdenticalTo extends AbstractMatcher { private final Object value; @@ -302,6 +339,11 @@ public class Matchers { 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 class Matchers { return new InSubpackage(targetPackageName); } + /** + * In Subpackage matcher + * + * @opensearch.internal + */ private static class InSubpackage extends AbstractMatcher { private final String targetPackageName; @@ -384,6 +431,11 @@ public class Matchers { 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 f1dae7da4ae..c0c1dc02f51 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 734d6da15a2..e8d984fce3d 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 @@ import static org.opensearch.common.inject.util.Types.newParameterizedTypeWithOw * will not). * * @author dpb@google.com (David P. Baker) + * + * @opensearch.internal */ public abstract class MapBinder { private MapBinder() {} @@ -299,6 +301,11 @@ public abstract class MapBinder { 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 6cd9fbc46d5..09e3a0ea984 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 @@ import static java.util.Collections.unmodifiableSet; * 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 7603df43c9d..1363103fdd2 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.lang.annotation.Annotation; 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 ddc1065cdca..3972c2f631d 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * 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 b15ffd073e2..beed8be7218 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 @@ package org.opensearch.common.inject.name; 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 8de65534baf..1de439f2cfb 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 @@ import java.util.Properties; * 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 596ec0df010..d7c7d9d6505 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 @@ import java.lang.annotation.Annotation; * @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 2633245f804..91df812b58a 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 @@ package org.opensearch.common.inject.spi; * @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 22e7d763e97..997bf78234f 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 @@ import java.util.Set; * * @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 9b5242298ac..e8d6b346f85 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 @@ import java.util.Set; * * @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 f4744525bed..8fa5610e899 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 @@ import java.lang.annotation.Annotation; * {@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 9ac3413155c..f6619973674 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 @@ import org.opensearch.common.inject.Binding; * {@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 5196fa68a88..01568e56242 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 @@ import org.opensearch.common.inject.Binding; * {@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 99158a44320..be1336ad0f2 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 @@ import static java.util.Collections.unmodifiableSet; * @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 3f30a2643b4..660aca1bd45 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 @@ import org.opensearch.common.inject.Binder; * @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 f6cbc39d5ed..d415560fc03 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 @@ import org.opensearch.common.inject.Binding; * @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 9ae2877e8b7..21dcc9ba549 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 @@ import java.util.Set; * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class Elements { @@ -112,6 +114,11 @@ public final class Elements { }; } + /** + * 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 42afd537739..d2563bc2728 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 @@ import org.opensearch.common.inject.Binding; * * @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 51141bea2a0..b142197fb71 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 @@ import java.util.Set; * * @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 aab5d65188f..7a760d2b84e 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 @@ package org.opensearch.common.inject.spi; * @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 36c145433c0..387f9ba0f3f 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 @@ import static org.opensearch.common.inject.internal.MoreTypes.getRawType; * * @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 bc15e00c120..6ce5febbb67 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 @@ import java.util.Set; * * @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 6db9caa209b..fd7c1303ed6 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 @@ import java.util.Set; * * @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 046c28f8d93..10b270e4996 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 @@ import org.opensearch.common.inject.Key; * * @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 d85d49ae8dd..1f652708de8 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 @@ import java.util.Objects; * * @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 b47eb787c73..78829e82c15 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 @@ import java.util.Objects; * } * * @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 badcc273359..e4d86a356cd 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 @@ import java.util.Set; * * @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 e2fa3674151..0a63fefc0a9 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 @@ import org.opensearch.common.inject.Provider; * * @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 8245f6cb65a..654f40e627e 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 @@ import java.util.Set; * * @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 92004d8d5c6..6f1ae8f2b9a 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 @@ import org.opensearch.common.inject.Provider; * * @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 190a8b14cf1..16060ddd3e2 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 @@ import java.util.Objects; * * @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 2f5485c23c9..6c450095a31 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 @@ import org.opensearch.common.inject.Provider; * 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 26b611e656e..7a619456e06 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 @@ import java.util.Objects; * * @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 64dc3d15a50..494e35e6c44 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 @@ import java.util.Set; * * @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 3b748b3eb1b..93a0f607ddc 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 @@ import org.opensearch.common.inject.TypeLiteral; * * @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 66bfa472e72..00b8c7c013b 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 @@ import java.util.Objects; * * @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 9db116db6be..e06751668c0 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 @@ import org.opensearch.common.inject.TypeLiteral; * * @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 720766f2a4d..fd7004aa80d 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 @@ import org.opensearch.common.inject.TypeLiteral; * 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 84d78698268..505028f0923 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 @@ import org.opensearch.common.inject.matcher.Matcher; * * @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 940706aaffb..37e40d45cb5 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 @@ import org.opensearch.common.inject.Binding; * * @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 c4461b893b7..ff2f2e7d0da 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 @@ import static org.opensearch.common.util.set.Sets.newHashSet; * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 + * + * @opensearch.internal */ public final class Modules { private Modules() {} @@ -277,6 +279,11 @@ public final class Modules { } } + /** + * 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 d7444e9b60e..8eb46885e29 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 @@ import org.opensearch.common.inject.Provider; * * @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 01f03856022..82f8190ebc2 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 @@ import java.util.Set; * * @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 3880d4dbf19..29f50b11723 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.ByteBuffer; 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 73fc09f6683..80b5dd35370 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 org.opensearch.threadpool.ThreadPool; 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 e8ba699f61e..e65c4307830 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 @@ import java.util.stream.StreamSupport; /** * 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 5d347e63693..b4dab5ecb7e 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 @@ import java.util.function.Consumer; *

* Mainly for use within the framework, * but also useful for application code. + * + * @opensearch.internal */ public abstract class Streams { @@ -257,6 +259,8 @@ public abstract class Streams { * 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 abstract class Streams { /** * 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 f8f90f29035..4c299d7c10a 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.IOException; 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 92b38e67f02..707b32a0c50 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.io.IOException; 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 1a4e34d9e7e..d9e1b19ccca 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 @@ package org.opensearch.common.io.stream; 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 e593f3c89b0..1572cd1f500 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 @@ import java.io.IOException; * 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 22c37ab476a..e6aacf7d0fc 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 @@ import java.io.IOException; /** * 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 9fcbc394172..e9b0b8d1f88 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.Closeable; 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 a4dddaf1f17..67cfe5f1025 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 @@ import java.io.IOException; * 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 @@ public abstract class DelayableWriteable implements Writeab */ abstract boolean isSerialized(); + /** + * A referencing writable + * + * @opensearch.internal + */ private static class Referencing extends DelayableWriteable { private final T reference; @@ -138,6 +145,8 @@ public abstract class DelayableWriteable implements Writeab /** * 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 7c5ebde4b5e..5f6bbd7c16c 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 @@ import java.io.IOException; /** * 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 f46ecc09f64..991fd0fc09a 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.EOFException; 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 e61cb729d84..380d764b60f 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 @@ package org.opensearch.common.io.stream; * 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 e695cbec979..cf537a59edb 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 @@ import java.io.IOException; /** * 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 15de91e551a..0240d0a0a8b 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 @@ import java.util.Objects; * * 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 e1e0f69aadb..f642dd17ad6 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 @@ import java.io.IOException; * 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 c849ed9e523..44cbe13be9a 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 @@ package org.opensearch.common.io.stream; 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 35d5aac182f..0fd86403053 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 @@ import org.opensearch.common.util.PageCacheRecycler; * {@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 fc50a4f8b08..4f3555fdb18 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 @@ import static org.opensearch.OpenSearchException.readStackTrace; * 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 e53e24171d8..11a22c4edf0 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 @@ import java.util.function.IntFunction; * 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 6ce224c8e21..408a2dc2638 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 @@ import org.opensearch.Version; /** * 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 253609cbaca..5fd227db6ca 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 @@ import java.io.IOException; * 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 f644ef43ae4..9ecb3f2236e 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.math.BigDecimal; 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 class Joda { 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 @@ public class Joda { 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 3b36e36624f..12d48a0b362 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.time.temporal.TemporalAccessor; 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 7ea576f9852..131c9b001f7 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 @@ import java.util.function.LongSupplier; * 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 cf0e2394c78..efb6362ab63 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.Map; 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 e7f854d7d10..4b167ff29ee 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 @@ import java.io.Closeable; /** * 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 bed26c6facd..5e885d239f8 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.io.UncheckedIOException; 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 bb8ded8098b..8905fb6f391 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 @@ import java.util.concurrent.ConcurrentHashMap; /** * 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 9e9715b8fa8..57e222680ce 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 @@ import org.apache.logging.log4j.Logger; * 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 1914b867036..df5a94ccd34 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 @@ import java.util.regex.Pattern; * 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 6643c03b09e..16c3858b157 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.PluginElement; 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 ff70ba883e1..f3ac7162e24 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 @@ import java.util.StringJoiner; * * 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 38803c002ca..e70692808a6 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.Set; 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 a81e2a4fc47..ad9981809ae 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 @@ import java.util.Set; /** * 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 845f6f2ad19..1273e1263c5 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 @@ import static org.opensearch.common.util.CollectionUtils.asArrayList; /** * 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 64905ced946..c1529b1875a 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 @@ import java.util.Arrays; /** * 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 e882ccc5f59..a3062bca901 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 @@ import java.util.Locale; /** * 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 48eba12ae0e..18051f9ca50 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 @@ import org.opensearch.common.util.concurrent.ThreadContext; * 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 a21857d082e..bc25f690d4a 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 @@ import org.apache.lucene.util.SetOnce; * 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 3cb4b591e2c..a1b014a81be 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 @@ import java.util.stream.Stream; *

* 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 @@ public class OpenSearchJsonLayout extends AbstractStringLayout { 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 dafe315ba04..f163e5e6a25 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 @@ import java.util.stream.Stream; /** * 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 6e0c1c4ef4c..fc9e523d00d 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 @@ import org.opensearch.common.Strings; /** * 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 eaec8a71e74..7d55ee7dbf9 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 @@ import java.util.WeakHashMap; /** * 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 a93f1188a76..c6e8a714f04 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 java.util.Set; 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 34e32b03426..2600a9a96c9 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 @@ package org.opensearch.common.lucene; 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 deca9baf56f..45a07e397cd 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 org.opensearch.common.logging.Loggers; 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 4cbc7a6668d..63a85c24750 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.Collections; 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 a883e111f7c..32581f2c843 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 org.apache.lucene.search.SimpleCollector; 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 4fe25387802..f8a0758a953 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 @@ package org.opensearch.common.lucene; 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 22360a23586..017aef15282 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 @@ import java.util.concurrent.ConcurrentHashMap; * 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 ebd108b79d6..61c9e9f54cb 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 @@ import java.util.List; * 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 bedd372d284..eabdc25f112 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 @@ import java.io.IOException; /** * 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 8d99eda7acf..26f3bb9ccbd 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 @@ import java.io.IOException; /** * 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 5ff20666ed6..10c76e43a71 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 @@ import org.opensearch.index.shard.ShardId; /** * 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 73c6e1e73f8..3e6630af074 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 @@ import java.io.IOException; * {@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 12dec26090b..ada5bc05984 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 @@ import java.util.List; /** * 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 2dcb0578fd2..0d7a8866f77 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 org.opensearch.common.lucene.Lucene; 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 bc83f07f741..93d18b3533d 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.List; 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 982779333e7..a893fcecf5b 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.List; 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 ac77420a79f..8b64a45b9db 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.List; 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 class Queries { 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 4b770529af4..65cffa208a4 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 @@ import java.util.Set; * 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 b7976058afc..5f8c52676b4 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 @@ import org.apache.lucene.search.TopDocs; /** * 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 63e6304fa50..35aab81e94b 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 @@ import java.util.Set; * - 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 final class XMoreLikeThis { /** * PriorityQueue that orders words by score. + * + * @opensearch.internal */ private static class FreqQ extends PriorityQueue { FreqQ(int maxSize) { @@ -1028,6 +1032,11 @@ public final class XMoreLikeThis { } } + /** + * A scored term + * + * @opensearch.internal + */ private static class ScoreTerm { String word; String topField; @@ -1048,6 +1057,8 @@ public final class XMoreLikeThis { /** * 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 3e0a6f59b4e..48a729d347e 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 org.opensearch.common.io.stream.Writeable; 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 3233fc9f8ce..3a21246da06 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 @@ import java.util.Objects; * 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 09239b01084..e52f77bf492 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 @@ import java.util.Objects; /** * 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 class FunctionScoreQuery extends Query { } } + /** + * 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 a9de8ead31e..ce733bbe786 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 @@ import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder; /** * 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 ad3c5b8031d..4ff283730a9 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 org.apache.lucene.search.Explanation; 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 368c41a149b..30be06489de 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 org.apache.lucene.search.Weight; 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 f4fcda47b00..48b3e0d04bd 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 @@ import java.util.Objects; /** * 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 48200d9dbac..fe01e8489d6 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 org.apache.lucene.index.LeafReaderContext; 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 3a7cc970908..533d74e916c 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 org.opensearch.common.Nullable; 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 846cfd4b643..8bf5fc0f89d 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 @@ import java.util.Objects; /** * 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 class ScriptScoreQuery extends Query { 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 class ScriptScoreQuery extends Query { } + /** + * A script scorable + * + * @opensearch.internal + */ private static class ScriptScorable extends Scorable { private final ScoreScript scoreScript; private final Scorable subQueryScorer; @@ -352,6 +364,8 @@ public class ScriptScoreQuery extends Query { /** * 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 71968a0545c..c439b57de41 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 org.opensearch.common.Strings; 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 @@ public class WeightFactorFunction extends ScoreFunction { 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 ed352fbf208..0113d238869 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 @@ import java.io.IOException; /** * 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 e23cedf86ea..618e02e9546 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 @@ import java.io.IOException; /** * 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 d0d776c816d..f71b0d3e361 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 @@ import java.io.OutputStream; /** * {@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 47e454b6f75..71075de0037 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 org.apache.lucene.store.IndexInput; 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 362badf046b..60d1f9e41ea 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 @@ import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO; * 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 bd10085c015..09b9a7e3e69 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 bea9c7b6bdc..57524bc3657 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.List; 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 @@ public final class VersionsAndSeqNoResolver { 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 final class VersionsAndSeqNoResolver { } } - /** 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 5d0b21df21a..5c48c1f772f 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 @@ package org.opensearch.common.metrics; 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 977d8e62a34..79c04d431e9 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 @@ package org.opensearch.common.metrics; 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 f56d1dd0e7f..f39de634ec4 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 86034fa8cac..651ab8883a9 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.Arrays; 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 054a5fac838..a849e0403a0 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.Collections; 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 6c4e14aa297..9e2ef0263f6 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 @@ import java.util.Locale; /** * 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 87a18f41dee..a4fbc6cb65b 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.nio.ByteBuffer; 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 324e35f683a..f5bc3face6e 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 @@ import java.util.Objects; * 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 0b517b8bda9..49002802a8f 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 @@ import java.util.function.Supplier; /** * 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 b5cad48643b..6a630dceadc 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.Objects; 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 13e4e5d2434..8660b876fa1 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 @@ import java.util.function.Predicate; /** * 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 4f28b197007..360da4c58bd 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 java.util.function.Supplier; 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 66adee7ae45..321062556ef 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 16a85ad6eda..8957880c27c 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 c279a554890..68d108d5860 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 @@ import java.util.concurrent.atomic.AtomicInteger; /** * 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 44a6c86f791..1d6588119e7 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 @@ import java.util.Deque; /** * 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 77a9a8cbc22..e3825eb53c5 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 cab62c7fc21..d3d74138d3d 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 class NoneRecycler extends AbstractRecycler { 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 e700a324f38..0c9127bf3eb 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 @@ import org.opensearch.common.lease.Releasable; /** * 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 6f7a254ec01..74916cf4e6d 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 com.carrotsearch.hppc.BitMixer; 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 dc42b09848e..2445f80cf7e 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.List; 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 eb109ac3d96..47e182b3caf 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 org.joda.time.chrono.ISOChronology; 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 70677a79b12..cbbbb09185e 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 @@ import java.util.Objects; * 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 abstract class Rounding implements Writeable { return new Builder(interval); } + /** + * Builder for rounding + * + * @opensearch.internal + */ public static class Builder { private final DateTimeUnit unit; @@ -118,6 +125,11 @@ public abstract class Rounding implements Writeable { } } + /** + * Rounding time units + * + * @opensearch.internal + */ static class TimeUnitRounding extends Rounding { static final byte ID = 1; @@ -284,6 +296,11 @@ public abstract class Rounding implements Writeable { } } + /** + * Rounding time intervals + * + * @opensearch.internal + */ static class TimeIntervalRounding extends Rounding { static final byte ID = 2; @@ -409,6 +426,11 @@ public abstract class Rounding implements Writeable { } } + /** + * 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 e6a8db808e7..640e8cbca46 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 @@ import java.util.stream.Collectors; /** * 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 a5fe3f8b0b3..d35d43e53c0 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 org.opensearch.env.Environment; 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 e386fffc3f5..cae8ca60022 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 @@ import org.opensearch.env.Environment; /** * 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 c3f0212b998..be92bf1643a 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 @@ import java.util.function.Predicate; /** * 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 8f3cb9e90ee..8be242165af 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 @@ import java.util.function.Consumer; * 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 3733c985046..59d8a44846e 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 org.opensearch.env.Environment; 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 68e1b5b598d..ba2666b53d7 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 @@ import java.util.function.Predicate; /** * 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 900eda69755..508e1bc38ea 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 @@ import java.util.regex.Pattern; * {@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 @@ public class KeyStoreWrapper implements SecureSettings { 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 5600900c1f0..dc5d96536fc 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 @@ import java.io.IOException; * 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 557710b7b69..ae5875cc8aa 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 @@ import java.util.Set; *

* 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 fa828746ab3..13abbcdc706 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 @@ import java.util.Set; * 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 abstract class SecureSetting extends 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 @@ public abstract class SecureSetting extends Setting { } } + /** + * An insecure string setting + * + * @opensearch.internal + */ private static class InsecureStringSetting extends Setting { private final String name; @@ -212,6 +224,11 @@ public abstract class SecureSetting extends Setting { } } + /** + * 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 05ed83573bb..e9829aac467 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 @@ import java.util.Set; /** * 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 83c6fbb78c9..468d760766b 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 @@ import java.util.Objects; /** * 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 86186872189..39cf0b9a4f3 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 @@ import java.util.stream.Stream; * 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 class Setting implements ToXContentObject { } + /** + * An affix setting + * + * @opensearch.internal + */ public static class AffixSetting extends Setting { private final AffixKey key; private final BiFunction> delegateFactory; @@ -1044,6 +1051,11 @@ public class Setting implements ToXContentObject { } + /** + * A group setting + * + * @opensearch.internal + */ private static class GroupSetting extends Setting { private final String key; private final Consumer validator; @@ -1918,6 +1930,11 @@ public class Setting implements ToXContentObject { } } + /** + * A list setting + * + * @opensearch.internal + */ private static class ListSetting extends Setting> { private final Function> defaultStringValue; @@ -2234,6 +2251,11 @@ public class Setting implements ToXContentObject { 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 d841278b344..1dabf020d83 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 @@ import java.util.List; * 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 9b9d3f54ffa..725817ef22c 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 @@ import static org.opensearch.common.unit.TimeValue.parseTimeValue; /** * An immutable settings implementation. + * + * @opensearch.internal */ public final class Settings implements ToXContentFragment { @@ -338,6 +340,8 @@ public final class Settings implements 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 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 final class Settings implements ToXContentFragment { * 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 final class Settings implements ToXContentFragment { } } + /** + * 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 db1c70ae208..965255903d2 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 @@ import java.io.IOException; /** * 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 43e6553aba1..9914674068e 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 @@ import java.util.Set; /** * 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 0874814f940..16b39bb2e33 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 @@ import java.util.stream.IntStream; /** * 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 e897b098917..46da933e3bf 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 @@ import org.opensearch.env.Environment; /** * 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 6756fa8a001..389195ba079 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 @@ import java.nio.charset.StandardCharsets; /** * 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 4ff810a1c50..dec08b68644 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.List; 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 bf8b9ea67ea..26af6fc4042 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.MONTH_OF_YEAR; 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 f75f70c35a3..f6573eaa902 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 @@ import java.util.function.LongSupplier; /** * 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 4eec4e810af..021b8a3be8b 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.getTotalMillisByYearM 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 4b0fa49b766..f3459a5857b 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 @@ package org.opensearch.common.time; * - 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 7894a653492..c80d95aad12 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 @@ import java.util.Optional; * 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 @@ class EpochTime { 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 4e1cfc5df87..ba0a8fcf4a1 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.Set; 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 f54bacc08f1..30a2cde37bb 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 @@ import java.util.spi.CalendarDataProvider; * 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 289dd0fe1ea..f9eeab38b28 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 87119002b07..1110d07693c 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 @@ import java.util.function.LongSupplier; * 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 a6aae567461..2a131c67047 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 @@ import java.io.IOException; * 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 c950749b497..72f8146cb96 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 @@ package org.opensearch.common.transport; 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 c2f16468046..c3ab5084e6e 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 com.carrotsearch.hppc.IntArrayList; 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 3efdfb1f976..666962e9aeb 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 @@ import java.net.UnknownHostException; /** * 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 1552833fe56..0a407bb3fe4 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 @@ import java.io.IOException; * 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 4f58abc64e4..b8aca01e305 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.io.IOException; 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 a4df3c6b590..0ca9dfe5f39 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 @@ import java.io.IOException; * 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 enum DistanceUnit implements Writeable { /** * 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 8b10d882351..c3b6ea6b8c2 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 @@ import java.util.Objects; * 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 ef212762c3f..18aae6277c3 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 java.util.Objects; 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 00cd999ed62..7f1840dae0f 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 @@ import org.opensearch.OpenSearchParseException; /** * 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 8ceb0bc9f53..a9491ef1919 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 1a644823d3d..bebb3fdf2a8 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 org.opensearch.common.io.stream.Writeable; 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 3833b479c94..c3560ec1e86 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.Collection; 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 4b18ebba810..e8fd3990bef 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 org.opensearch.common.recycler.Recycler; 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 edf4d93ef41..ce12a4f5d1b 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 @@ import org.opensearch.common.lease.Releasables; /** * 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 bc76bfa5240..1ff30382970 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 @@ import org.opensearch.common.lease.Releasable; /** * 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 ccd6a51ff50..6a01d9b3901 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 @@ package org.opensearch.common.util; 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 c71b3da9ef1..f6cac6374bb 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 @@ package org.opensearch.common.util; 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 e877f75bd2a..b3a4a7d25d3 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 @@ public class BigArrays { 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 @@ public class BigArrays { } + /** + * Wraps a byte array + * + * @opensearch.internal + */ private static class ByteArrayWrapper extends AbstractArrayWrapper implements ByteArray { private final byte[] array; @@ -170,6 +180,11 @@ public class BigArrays { } } + /** + * Wraps an int array + * + * @opensearch.internal + */ private static class IntArrayWrapper extends AbstractArrayWrapper implements IntArray { private final int[] array; @@ -213,6 +228,11 @@ public class BigArrays { } + /** + * Wraps a long array + * + * @opensearch.internal + */ private static class LongArrayWrapper extends AbstractArrayWrapper implements LongArray { private final long[] array; @@ -255,6 +275,11 @@ public class BigArrays { } } + /** + * Wraps a double array + * + * @opensearch.internal + */ private static class DoubleArrayWrapper extends AbstractArrayWrapper implements DoubleArray { private final long[] array; @@ -298,6 +323,11 @@ public class BigArrays { } + /** + * Wraps a float array + * + * @opensearch.internal + */ private static class FloatArrayWrapper extends AbstractArrayWrapper implements FloatArray { private final int[] array; @@ -341,6 +371,11 @@ public class BigArrays { } + /** + * Wraps an object array + * + * @opensearch.internal + */ private static class ObjectArrayWrapper extends AbstractArrayWrapper implements ObjectArray { private final Object[] array; @@ -716,6 +751,11 @@ public class BigArrays { 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 6dac5ec705a..db1d1014ffe 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 @@ import static org.opensearch.common.util.PageCacheRecycler.BYTE_PAGE_SIZE; /** * 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 ad75f13c80a..c66b0720d0a 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 @@ import static org.opensearch.common.util.PageCacheRecycler.LONG_PAGE_SIZE; /** * 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 5935e02f9a9..028248c3cc9 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 @@ import static org.opensearch.common.util.PageCacheRecycler.INT_PAGE_SIZE; /** * 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 d403d99e285..03ae3e642df 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 @@ import static org.opensearch.common.util.PageCacheRecycler.INT_PAGE_SIZE; /** * 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 23a72706fcc..19f954eca2d 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 @@ import static org.opensearch.common.util.PageCacheRecycler.LONG_PAGE_SIZE; /** * 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 c90e74efb16..6fb5662686a 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 @@ import static org.opensearch.common.util.PageCacheRecycler.OBJECT_PAGE_SIZE; /** * 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 5807fc192ab..ca63c170c0c 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 @@ package org.opensearch.common.util; * 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 57ad5ae326c..b75a5d07e70 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 @@ import org.opensearch.common.lease.Releasables; * 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 0b360148ddc..44deb7f4fdb 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 @@ import java.nio.ByteBuffer; /** * 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 b0054bc1a06..36ae3b1f5bc 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 5de58016de3..eb44b30a7e3 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 @@ import org.opensearch.common.lease.Releasables; * 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 647ef46f7a8..f81e57d9fba 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 @@ import java.util.function.Supplier; * 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 f9cb8cc2d60..d52d717865d 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 @@ import java.util.Set; * 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 class CancellableThreads { 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 7817e7b29df..622efc2074d 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.Objects; 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 class CollectionUtils { } } + /** + * 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 6fe67d378c2..451add56b25 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 @@ import java.util.concurrent.atomic.AtomicLong; /** * 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 9a5f8d1849e..39e57dc5d16 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 @@ import java.util.Comparator; /** * {@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 ee354421a86..1adf6d2fb01 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 e23b21936df..8ef48c8d6e1 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 @@ import java.util.Random; * 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 f047882c842..45e57085dcc 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 @@ package org.opensearch.common.util; /** * 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 34c613f5423..0b31e381466 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 @@ package org.opensearch.common.util; * 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 f1744fef831..b402b8e81aa 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 @@ package org.opensearch.common.util; /** * 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 0beb5e12134..4a6e8fe5a6f 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 @@ package org.opensearch.common.util; /** * 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 e302f22bd0a..98192796fb9 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 @@ import java.util.function.Consumer; * {@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 47617d198b6..c684b1b2d78 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 @@ import java.util.MissingResourceException; /** * 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 e88c27cb0e8..c794af85043 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 @@ package org.opensearch.common.util; /** * 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 079577b1530..71272e79c65 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 @@ import org.opensearch.common.lease.Releasable; * 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 33777ecc89f..1a720eae82a 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 @@ import org.opensearch.common.lease.Releasables; * 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 9abd0c9d466..9b8f9621fb9 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 @@ import java.util.NoSuchElementException; /** * 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 db99ec29d3a..08ee2375d1f 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 @@ package org.opensearch.common.util; 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 7663c53bb51..142a722821e 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 @@ package org.opensearch.common.util; /** * 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 ae9555902c3..d0f660b9ac4 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.concurrentDeque; 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 a84e8a06480..fff8126f13e 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.Collections; 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 474e33ccf29..c8e60bddb8d 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 @@ import java.util.function.Consumer; *

* 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 dafcff9dfd1..c2c5613f0f3 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 @@ import java.util.concurrent.locks.ReentrantLock; /** * 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 2558374dda2..a3c385e5ea6 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 @@ import java.net.URISyntaxException; * * 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 337fd59cfce..7c599476e26 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 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * 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 c283c5c6183..b55280d43a4 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 @@ import java.util.Objects; * {@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 446e563575e..3afeb10bcb9 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 @@ package org.opensearch.common.util.concurrent; /** * 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 d04982da327..72cc0f5ee21 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 @@ import java.util.function.Supplier; * 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 efb8fce467a..dd1f71a7d21 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 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * 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 14c6c366f0b..fef37299b34 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.TimeUnit; 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 758682fb9ff..c646d476e17 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.ConcurrentLinkedQueue; 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 d93d55d106e..6ee1b0a3824 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.Map; 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 fb1c752dd7a..7656a957dc5 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 @@ package org.opensearch.common.util.concurrent; 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 23843b9e0c5..9dc67ab40db 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 @@ import java.util.concurrent.atomic.AtomicInteger; * 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 50ab3bccf6b..83fdbf8790e 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.Future; 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 5b2cb6c2312..9d4235f8d8a 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 @@ import java.util.concurrent.locks.ReentrantLock; * 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 ce6fa0e46d0..cc865022e1e 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 @@ import java.util.concurrent.TimeUnit; * 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 aa13d1d8f5c..fc9a179083f 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 org.opensearch.common.metrics.CounterMetric; 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 5a967528a6a..094a356151b 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.TimeUnit; 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 class OpenSearchExecutors { return new OpenSearchThreadFactory(namePrefix); } + /** + * A thread factory + * + * @opensearch.internal + */ static class OpenSearchThreadFactory implements ThreadFactory { final ThreadGroup group; @@ -363,6 +373,11 @@ public class OpenSearchExecutors { */ private OpenSearchExecutors() {} + /** + * A scaling queue for executors + * + * @opensearch.internal + */ static class ExecutorScalingQueue extends LinkedTransferQueue { ThreadPoolExecutor executor; @@ -396,6 +411,8 @@ public class OpenSearchExecutors { /** * 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 aee5bc63d9d..74b5e477c36 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 @@ package org.opensearch.common.util.concurrent; 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 a04554f9b02..2ebf8a1cc97 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 @@ import java.util.stream.Stream; /** * 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 93250eea8e7..806a6e11606 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 org.opensearch.common.Priority; 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 abstract class PrioritizedCallable implements Callable, Comparable< 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 797d4760170..d3d0f6080e7 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 @@ import java.util.concurrent.atomic.AtomicLong; * 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 @@ public class PrioritizedOpenSearchThreadPoolExecutor extends OpenSearchThreadPoo 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 8a932b799ee..96a74e44a57 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 org.opensearch.common.Priority; 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 abstract class PrioritizedRunnable implements Runnable, Comparable 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 a2bb53ad909..5539b5efa4a 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 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * 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 d2d50eb95ed..ad790b8dbd4 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 @@ import java.util.concurrent.atomic.AtomicInteger; * 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 d844a8f158e..02a3b24e028 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 @@ import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_WARNING * // previous context is restored on StoredContext#close() * * + * @opensearch.internal */ public final class ThreadContext implements Writeable { @@ -805,6 +806,11 @@ public final class ThreadContext implements Writeable { 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 8aa14d556e8..f3bc50a3345 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 @@ import org.opensearch.ExceptionsHelper; /** * 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 85f8de915e3..5d99a346f6f 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 org.opensearch.common.io.stream.StreamInput; 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 ee4fe31ffa0..9763786ff4a 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 51d30a7312f..c56910348c1 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 @@ package org.opensearch.common.util.concurrent; 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 788386e9d15..e3f13fef37a 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.Objects; 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 class Iterables { return new ConcatenatedIterable<>(inputs); } + /** + * Concatenated interable + * + * @opensearch.internal + */ static class ConcatenatedIterable implements Iterable { private final Iterable[] inputs; @@ -71,6 +81,11 @@ public class Iterables { 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 1d7175ad424..2dc2fb3175d 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.function.Supplier; 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 final class Sets { 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 6ce57857515..f390ebee55d 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 @@ import java.util.function.Supplier; * 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 c833fd5cede..d342ee30a53 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 @@ import java.util.function.BiConsumer; /** * 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 f2d1c815d70..bb69a43e714 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 @@ import java.util.Set; /** * 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 45d41bca95e..8eedd5fb468 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 @@ import org.opensearch.rest.RestStatus; /** * 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 0fd473f47ac..f765045bf27 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 java.util.Locale; 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 d0eca4228d1..e4b35d6ee27 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.List; 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 214b35c13c7..f90f180f1eb 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 @@ import java.util.function.Function; * 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 822210ffc18..6848bbc639e 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 @@ import java.util.function.Consumer; /** * 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 5eb4b782b3f..9170cfaf8ea 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.List; 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 2314cbd11df..10328d3e2ce 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.Queue; 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 @@ public class InternalSnapshotsInfoService implements ClusterStateListener, Snaps 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 a95c711870e..3bdda9413cf 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 class RestoreService implements ClusterStateApplier { } } + /** + * 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 f08a52a4e75..d7ebba721a5 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;