nodeResultComparator = Comparator.comparing(NodeAllocationResult::getNodeDecision)
@@ -191,8 +193,9 @@ public int compareTo(NodeAllocationResult other) {
/**
* A class that captures metadata about a shard store on a node.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static final class ShardStoreInfo implements ToXContentFragment, Writeable {
private final boolean inSync;
@Nullable
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java
index 9e8e399384467..bf2db57128517 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/RoutingAllocation.java
@@ -43,6 +43,7 @@
import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.opensearch.cluster.routing.allocation.decider.Decision;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.index.shard.ShardId;
import org.opensearch.snapshots.RestoreService.RestoreInProgressUpdater;
import org.opensearch.snapshots.SnapshotShardSizeInfo;
@@ -60,8 +61,9 @@
* of shards and holds the {@link AllocationDeciders} which are responsible
* for the current routing state.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class RoutingAllocation {
private final AllocationDeciders deciders;
@@ -317,8 +319,9 @@ public void setHasPendingAsyncFetch() {
/**
* Debug mode.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public enum DebugMode {
/**
* debug mode is off
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/ShardAllocationDecision.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/ShardAllocationDecision.java
index e1a7fb43827f3..49e8d82c6eb97 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/ShardAllocationDecision.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/ShardAllocationDecision.java
@@ -32,6 +32,7 @@
package org.opensearch.cluster.routing.allocation;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.common.io.stream.Writeable;
@@ -53,8 +54,9 @@
* then both {@link #getAllocateDecision()} and {@link #getMoveDecision()} will return
* objects whose {@code isDecisionTaken()} method returns {@code false}.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ShardAllocationDecision implements ToXContentFragment, Writeable {
public static final ShardAllocationDecision NOT_TAKEN = new ShardAllocationDecision(
AllocateUnassignedDecision.NOT_TAKEN,
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommand.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommand.java
index def0411853643..bce3191240323 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommand.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommand.java
@@ -35,6 +35,7 @@
import org.opensearch.OpenSearchException;
import org.opensearch.cluster.routing.allocation.RerouteExplanation;
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.network.NetworkModule;
import org.opensearch.core.common.io.stream.NamedWriteable;
import org.opensearch.core.xcontent.ToXContentObject;
@@ -46,8 +47,9 @@
*
* Commands are registered in {@link NetworkModule}.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface AllocationCommand extends NamedWriteable, ToXContentObject {
/**
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommands.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommands.java
index ac804819443a5..2ee4124e9d909 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommands.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/command/AllocationCommands.java
@@ -36,6 +36,7 @@
import org.opensearch.OpenSearchParseException;
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
import org.opensearch.cluster.routing.allocation.RoutingExplanations;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
@@ -54,8 +55,9 @@
* A simple {@link AllocationCommand} composite managing several
* {@link AllocationCommand} implementations
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class AllocationCommands implements ToXContentFragment {
private final List commands = new ArrayList<>();
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDecider.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDecider.java
index 85f193c8c5580..19faacc3a3ae1 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDecider.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDecider.java
@@ -38,14 +38,16 @@
import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
import org.opensearch.cluster.routing.allocation.decider.Decision.Type;
+import org.opensearch.common.annotation.PublicApi;
/**
* {@link AllocationDecider} is an abstract base class that allows to make
* dynamic cluster- or index-wide shard allocation decisions on a per-node
* basis.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class AllocationDecider {
/**
* Returns a {@link Decision} whether the given shard routing can be
diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDeciders.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDeciders.java
index dca82f75d6fb5..22c3156fb3537 100644
--- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDeciders.java
+++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/AllocationDeciders.java
@@ -39,6 +39,7 @@
import org.opensearch.cluster.routing.RoutingNode;
import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
+import org.opensearch.common.annotation.PublicApi;
import java.util.Collection;
import java.util.Collections;
@@ -47,8 +48,9 @@
* A composite {@link AllocationDecider} combining the "decision" of multiple
* {@link AllocationDecider} implementations into a single allocation decision.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class AllocationDeciders extends AllocationDecider {
private static final Logger logger = LogManager.getLogger(AllocationDeciders.class);
diff --git a/server/src/main/java/org/opensearch/common/Rounding.java b/server/src/main/java/org/opensearch/common/Rounding.java
index 667eb4529fe38..861cdf78cc056 100644
--- a/server/src/main/java/org/opensearch/common/Rounding.java
+++ b/server/src/main/java/org/opensearch/common/Rounding.java
@@ -38,6 +38,7 @@
import org.opensearch.common.LocalTimeOffset.Gap;
import org.opensearch.common.LocalTimeOffset.Overlap;
import org.opensearch.common.annotation.InternalApi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.time.DateUtils;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.core.common.io.stream.StreamInput;
@@ -76,16 +77,18 @@
* 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
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class Rounding implements Writeable {
private static final Logger logger = LogManager.getLogger(Rounding.class);
/**
* A Date Time Unit
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public enum DateTimeUnit {
WEEK_OF_WEEKYEAR((byte) 1, "week", IsoFields.WEEK_OF_WEEK_BASED_YEAR, true, TimeUnit.DAYS.toMillis(7)) {
private final long extraLocalOffsetLookup = TimeUnit.DAYS.toMillis(7);
@@ -268,8 +271,9 @@ public void writeTo(StreamOutput out) throws IOException {
/**
* A strategy for rounding milliseconds since epoch.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public interface Prepared {
/**
* Rounds the given value.
@@ -359,8 +363,9 @@ public static Builder builder(TimeValue interval) {
/**
* Builder for rounding
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class Builder {
private final DateTimeUnit unit;
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 0b2b608b55df0..30e7c014a2ec0 100644
--- a/server/src/main/java/org/opensearch/common/cache/Cache.java
+++ b/server/src/main/java/org/opensearch/common/cache/Cache.java
@@ -32,6 +32,7 @@
package org.opensearch.common.cache;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.util.concurrent.ReleasableLock;
@@ -80,8 +81,9 @@
* @param The type of the keys
* @param The type of the values
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class Cache {
// positive if entries have an expiration
@@ -732,8 +734,9 @@ public CacheStats stats() {
/**
* Cache statistics
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class CacheStats {
private long hits;
private long misses;
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 3c80fe5d66d5d..9fd43a03e7f9d 100644
--- a/server/src/main/java/org/opensearch/common/cache/CacheLoader.java
+++ b/server/src/main/java/org/opensearch/common/cache/CacheLoader.java
@@ -32,12 +32,15 @@
package org.opensearch.common.cache;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* An interface for a cache loader.
*
- * @opensearch.internal
+ * @opensearch.api
*/
@FunctionalInterface
+@PublicApi(since = "1.0.0")
public interface CacheLoader {
V load(K key) throws Exception;
}
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 6d355b2122460..42303b8cfdc73 100644
--- a/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java
+++ b/server/src/main/java/org/opensearch/common/cache/RemovalNotification.java
@@ -32,11 +32,14 @@
package org.opensearch.common.cache;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Notification when an element is removed from the cache
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class RemovalNotification {
private final K key;
diff --git a/server/src/main/java/org/opensearch/common/cache/RemovalReason.java b/server/src/main/java/org/opensearch/common/cache/RemovalReason.java
index e5d795c093547..514b84a7823ca 100644
--- a/server/src/main/java/org/opensearch/common/cache/RemovalReason.java
+++ b/server/src/main/java/org/opensearch/common/cache/RemovalReason.java
@@ -8,11 +8,14 @@
package org.opensearch.common.cache;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Reason for notification removal
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public enum RemovalReason {
REPLACED,
INVALIDATED,
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 550bc5b3fd524..23fc6353dbad3 100644
--- a/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java
+++ b/server/src/main/java/org/opensearch/common/compress/CompressedXContent.java
@@ -32,6 +32,7 @@
package org.opensearch.common.compress;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.io.Streams;
import org.opensearch.common.io.stream.BytesStreamOutput;
import org.opensearch.common.xcontent.XContentFactory;
@@ -57,8 +58,9 @@
* 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
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class CompressedXContent {
private static int crc32(BytesReference data) {
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 c98bd853dfced..0712b7b050bec 100644
--- a/server/src/main/java/org/opensearch/common/time/DateFormatter.java
+++ b/server/src/main/java/org/opensearch/common/time/DateFormatter.java
@@ -32,6 +32,7 @@
package org.opensearch.common.time;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.Strings;
import org.joda.time.DateTime;
@@ -49,8 +50,9 @@
/**
* Base Date formatter
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface DateFormatter {
/**
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 7088d6cb7a498..8c123d7d2ebc9 100644
--- a/server/src/main/java/org/opensearch/common/time/DateMathParser.java
+++ b/server/src/main/java/org/opensearch/common/time/DateMathParser.java
@@ -32,6 +32,7 @@
package org.opensearch.common.time;
+import org.opensearch.common.annotation.PublicApi;
import org.joda.time.DateTimeZone;
import java.time.Instant;
@@ -41,8 +42,9 @@
/**
* An abstraction over date math parsing to allow different implementation for joda and java time.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface DateMathParser {
/**
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 59c84ea45a65a..cbe8ab76797ce 100644
--- a/server/src/main/java/org/opensearch/common/util/BigArrays.java
+++ b/server/src/main/java/org/opensearch/common/util/BigArrays.java
@@ -36,6 +36,7 @@
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.RamUsageEstimator;
import org.opensearch.common.Nullable;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.lease.Releasable;
import org.opensearch.common.lease.Releasables;
import org.opensearch.common.recycler.Recycler;
@@ -48,6 +49,7 @@
import java.util.Arrays;
/** Utility class to work with arrays. */
+@PublicApi(since = "1.0.0")
public class BigArrays {
public static final BigArrays NON_RECYCLING_INSTANCE = new BigArrays(null, null, CircuitBreaker.REQUEST);
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 1adf6d2fb015c..925d1b6066a99 100644
--- a/server/src/main/java/org/opensearch/common/util/Countable.java
+++ b/server/src/main/java/org/opensearch/common/util/Countable.java
@@ -32,11 +32,14 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Base countable interface.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Countable {
int size();
}
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 ae66902f6f795..aa9238634f2c7 100644
--- a/server/src/main/java/org/opensearch/common/util/DoubleArray.java
+++ b/server/src/main/java/org/opensearch/common/util/DoubleArray.java
@@ -32,13 +32,15 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.util.BigArray;
/**
* Abstraction of an array of double values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface DoubleArray extends BigArray {
/**
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 81f6bebb7508c..bda7324d19273 100644
--- a/server/src/main/java/org/opensearch/common/util/FloatArray.java
+++ b/server/src/main/java/org/opensearch/common/util/FloatArray.java
@@ -32,13 +32,15 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.util.BigArray;
/**
* Abstraction of an array of double values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
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 eb43e013f3758..ad0173904f74a 100644
--- a/server/src/main/java/org/opensearch/common/util/IntArray.java
+++ b/server/src/main/java/org/opensearch/common/util/IntArray.java
@@ -32,13 +32,15 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.util.BigArray;
/**
* Abstraction of an array of integer values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface IntArray extends BigArray {
/**
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 0c32effd04cdc..c2f649e49f470 100644
--- a/server/src/main/java/org/opensearch/common/util/LongArray.java
+++ b/server/src/main/java/org/opensearch/common/util/LongArray.java
@@ -32,13 +32,15 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.util.BigArray;
/**
* Abstraction of an array of long values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface LongArray extends BigArray {
/**
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 9c882742b56ab..f3f73b7e37485 100644
--- a/server/src/main/java/org/opensearch/common/util/ObjectArray.java
+++ b/server/src/main/java/org/opensearch/common/util/ObjectArray.java
@@ -32,13 +32,15 @@
package org.opensearch.common.util;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.util.BigArray;
/**
* Abstraction of an array of object values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ObjectArray extends BigArray {
/**
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 fc2e4217bae79..3da21a6777456 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
@@ -35,6 +35,7 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.action.support.ContextPreservingActionListener;
import org.opensearch.client.OriginSettingClient;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.collect.MapBuilder;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.settings.Setting;
@@ -97,8 +98,9 @@
* // previous context is restored on StoredContext#close()
*
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ThreadContext implements Writeable {
public static final String PREFIX = "request.headers";
@@ -545,9 +547,10 @@ public boolean isSystemContext() {
/**
* A stored context
*
- * @opensearch.internal
+ * @opensearch.api
*/
@FunctionalInterface
+ @PublicApi(since = "1.0.0")
public interface StoredContext extends AutoCloseable {
@Override
void close();
diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContextStatePropagator.java b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContextStatePropagator.java
index b3fc79c5446db..dac70b0e8124e 100644
--- a/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContextStatePropagator.java
+++ b/server/src/main/java/org/opensearch/common/util/concurrent/ThreadContextStatePropagator.java
@@ -8,12 +8,17 @@
package org.opensearch.common.util.concurrent;
+import org.opensearch.common.annotation.PublicApi;
+
import java.util.Map;
/**
* The propagator for {@link ThreadContext} that helps to carry-over the state from one
* thread to another (tasks, tracing context, etc).
+ *
+ * @opensearch.api
*/
+@PublicApi(since = "2.8.0")
public interface ThreadContextStatePropagator {
/**
* Returns the list of transient headers that needs to be propagated from current context to new thread context.
diff --git a/server/src/main/java/org/opensearch/env/NodeEnvironment.java b/server/src/main/java/org/opensearch/env/NodeEnvironment.java
index 40c5722308b79..c7ba5eb040a1f 100644
--- a/server/src/main/java/org/opensearch/env/NodeEnvironment.java
+++ b/server/src/main/java/org/opensearch/env/NodeEnvironment.java
@@ -770,8 +770,11 @@ public void setDetails(String details) {
/**
* A functional interface that people can use to reference {@link #shardLock(ShardId, String, long)}
+ *
+ * @opensearch.api
*/
@FunctionalInterface
+ @PublicApi(since = "1.0.0")
public interface ShardLocker {
ShardLock lock(ShardId shardId, String lockDetails, long lockTimeoutMS) throws ShardLockObtainFailedException;
}
diff --git a/server/src/main/java/org/opensearch/index/IndexService.java b/server/src/main/java/org/opensearch/index/IndexService.java
index 84e8e2f41aaf1..46e4dbb61be74 100644
--- a/server/src/main/java/org/opensearch/index/IndexService.java
+++ b/server/src/main/java/org/opensearch/index/IndexService.java
@@ -48,6 +48,7 @@
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.CheckedFunction;
import org.opensearch.common.Nullable;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Setting.Property;
import org.opensearch.common.settings.Settings;
@@ -304,8 +305,9 @@ static boolean needsMapperService(IndexSettings indexSettings, IndexCreationCont
/**
* Context for index creation
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public enum IndexCreationContext {
CREATE_INDEX,
METADATA_VERIFICATION
@@ -979,8 +981,9 @@ private void rescheduleRefreshTasks() {
/**
* Shard Store Deleter Interface
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public interface ShardStoreDeleter {
void deleteShardStore(String reason, ShardLock lock, IndexSettings indexSettings) throws IOException;
diff --git a/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java b/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java
index 3b1f6af8a0030..793cdcd5c5c1a 100644
--- a/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java
+++ b/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java
@@ -38,6 +38,7 @@
import org.opensearch.OpenSearchException;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.io.IOUtils;
import org.opensearch.env.Environment;
@@ -67,8 +68,9 @@
* An internal registry for tokenizer, token filter, char filter and analyzer.
* This class exists per node and allows to create per-index {@link IndexAnalyzers} via {@link #build(IndexSettings)}
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class AnalysisRegistry implements Closeable {
public static final String INDEX_ANALYSIS_CHAR_FILTER = "index.analysis.char_filter";
public static final String INDEX_ANALYSIS_FILTER = "index.analysis.filter";
diff --git a/server/src/main/java/org/opensearch/index/analysis/AnalyzerProvider.java b/server/src/main/java/org/opensearch/index/analysis/AnalyzerProvider.java
index 24ddabca16f1e..db0b3e8d288d6 100644
--- a/server/src/main/java/org/opensearch/index/analysis/AnalyzerProvider.java
+++ b/server/src/main/java/org/opensearch/index/analysis/AnalyzerProvider.java
@@ -33,13 +33,15 @@
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.Analyzer;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Provider;
/**
* Base interface for all analyzer providers
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface AnalyzerProvider extends Provider {
String name();
diff --git a/server/src/main/java/org/opensearch/index/analysis/CharFilterFactory.java b/server/src/main/java/org/opensearch/index/analysis/CharFilterFactory.java
index dc9d3704b1a3c..938932280a52a 100644
--- a/server/src/main/java/org/opensearch/index/analysis/CharFilterFactory.java
+++ b/server/src/main/java/org/opensearch/index/analysis/CharFilterFactory.java
@@ -32,13 +32,16 @@
package org.opensearch.index.analysis;
+import org.opensearch.common.annotation.PublicApi;
+
import java.io.Reader;
/**
* Base character filter factory behavior used in analysis chain
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface CharFilterFactory {
String name();
diff --git a/server/src/main/java/org/opensearch/index/analysis/IndexAnalyzers.java b/server/src/main/java/org/opensearch/index/analysis/IndexAnalyzers.java
index 4d72ee48cf33a..fe06504c71333 100644
--- a/server/src/main/java/org/opensearch/index/analysis/IndexAnalyzers.java
+++ b/server/src/main/java/org/opensearch/index/analysis/IndexAnalyzers.java
@@ -31,6 +31,7 @@
package org.opensearch.index.analysis;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.util.io.IOUtils;
import java.io.Closeable;
@@ -52,8 +53,9 @@
*
* @see AnalysisRegistry
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class IndexAnalyzers implements Closeable {
private final Map analyzers;
private final Map normalizers;
diff --git a/server/src/main/java/org/opensearch/index/analysis/TokenFilterFactory.java b/server/src/main/java/org/opensearch/index/analysis/TokenFilterFactory.java
index 6708db8571b2a..af18927de8a98 100644
--- a/server/src/main/java/org/opensearch/index/analysis/TokenFilterFactory.java
+++ b/server/src/main/java/org/opensearch/index/analysis/TokenFilterFactory.java
@@ -34,6 +34,7 @@
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.search.fetch.subphase.highlight.FastVectorHighlighter;
import java.util.List;
@@ -42,8 +43,9 @@
/**
* Base token filter factory used in analysis chain
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface TokenFilterFactory {
String name();
diff --git a/server/src/main/java/org/opensearch/index/analysis/TokenizerFactory.java b/server/src/main/java/org/opensearch/index/analysis/TokenizerFactory.java
index b667175e89b4a..a1a9c4966865d 100644
--- a/server/src/main/java/org/opensearch/index/analysis/TokenizerFactory.java
+++ b/server/src/main/java/org/opensearch/index/analysis/TokenizerFactory.java
@@ -33,14 +33,16 @@
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
+import org.opensearch.common.annotation.PublicApi;
import java.util.function.Supplier;
/**
* Base tokenizer factory used in analysis chain
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface TokenizerFactory {
String name();
diff --git a/server/src/main/java/org/opensearch/index/cache/query/QueryCache.java b/server/src/main/java/org/opensearch/index/cache/query/QueryCache.java
index 384f66fcfc132..2c8188a523ade 100644
--- a/server/src/main/java/org/opensearch/index/cache/query/QueryCache.java
+++ b/server/src/main/java/org/opensearch/index/cache/query/QueryCache.java
@@ -32,6 +32,7 @@
package org.opensearch.index.cache.query;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.index.IndexComponent;
import java.io.Closeable;
@@ -39,8 +40,9 @@
/**
* Base interface for a query cache
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface QueryCache extends IndexComponent, Closeable, org.apache.lucene.search.QueryCache {
void clear(String reason);
diff --git a/server/src/main/java/org/opensearch/index/fielddata/DocValueBits.java b/server/src/main/java/org/opensearch/index/fielddata/DocValueBits.java
index 18fa26bd10623..cf62688b88b65 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/DocValueBits.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/DocValueBits.java
@@ -32,13 +32,16 @@
package org.opensearch.index.fielddata;
+import org.opensearch.common.annotation.PublicApi;
+
import java.io.IOException;
/**
* Base class for doc value bit sets
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class DocValueBits {
/**
diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java
index 81d4ce2dd8772..6a79679cc2f09 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java
@@ -48,6 +48,7 @@
import org.apache.lucene.util.BitSet;
import org.apache.lucene.util.BytesRef;
import org.opensearch.common.Nullable;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.util.BigArrays;
import org.opensearch.core.indices.breaker.CircuitBreakerService;
import org.opensearch.index.fielddata.IndexFieldData.XFieldComparatorSource.Nested;
@@ -64,8 +65,9 @@
* Thread-safe utility class that allows to get per-segment values via the
* {@link #load(LeafReaderContext)} method.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface IndexFieldData {
/**
@@ -154,7 +156,10 @@ public void disableSkipping() {
* R will be in the parent filter and its children documents will be the
* documents that are contained in the inner set between the previous
* parent + 1, or 0 if there is no previous parent, and R (excluded).
+ *
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class Nested {
private final BitSetProducer rootFilter;
@@ -293,8 +298,9 @@ public abstract BucketedSort newBucketedSort(
/**
* Base builder interface
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
interface Builder {
IndexFieldData> build(IndexFieldDataCache cache, CircuitBreakerService breakerService);
@@ -303,8 +309,9 @@ interface Builder {
/**
* Base Global field data class
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
interface Global extends IndexFieldData {
IndexFieldData loadGlobal(DirectoryReader indexReader);
diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java
index 72df2453fc7fd..5cdcc3f82879f 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java
@@ -35,13 +35,15 @@
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.util.Accountable;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.index.shard.ShardId;
/**
* A simple field data cache abstraction on the *index* level.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface IndexFieldDataCache {
> FD load(LeafReaderContext context, IFD indexFieldData) throws Exception;
@@ -62,8 +64,9 @@ > IFD load(Direc
/**
* The listener interface
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
interface Listener {
/**
diff --git a/server/src/main/java/org/opensearch/index/fielddata/LeafFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/LeafFieldData.java
index 2982363937710..da7179254d70f 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/LeafFieldData.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/LeafFieldData.java
@@ -33,6 +33,7 @@
package org.opensearch.index.fielddata;
import org.apache.lucene.util.Accountable;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.lease.Releasable;
import org.opensearch.index.mapper.DocValueFetcher;
import org.opensearch.search.DocValueFormat;
@@ -42,8 +43,9 @@
/**
* The thread safe {@link org.apache.lucene.index.LeafReader} level cache of the data.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface LeafFieldData extends Accountable, Releasable {
/**
diff --git a/server/src/main/java/org/opensearch/index/fielddata/NumericDoubleValues.java b/server/src/main/java/org/opensearch/index/fielddata/NumericDoubleValues.java
index 94ea91849ff12..b0f3400acfb3d 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/NumericDoubleValues.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/NumericDoubleValues.java
@@ -34,14 +34,16 @@
import org.apache.lucene.index.NumericDocValues;
import org.apache.lucene.search.DoubleValues;
+import org.opensearch.common.annotation.PublicApi;
import java.io.IOException;
/**
* A per-document numeric value.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class NumericDoubleValues extends DoubleValues {
/** Sole constructor. (For invocation by subclass
diff --git a/server/src/main/java/org/opensearch/index/fielddata/SortedNumericDoubleValues.java b/server/src/main/java/org/opensearch/index/fielddata/SortedNumericDoubleValues.java
index 91d28113ae783..dce1aff9cc94f 100644
--- a/server/src/main/java/org/opensearch/index/fielddata/SortedNumericDoubleValues.java
+++ b/server/src/main/java/org/opensearch/index/fielddata/SortedNumericDoubleValues.java
@@ -33,14 +33,16 @@
package org.opensearch.index.fielddata;
import org.apache.lucene.index.SortedNumericDocValues;
+import org.opensearch.common.annotation.PublicApi;
import java.io.IOException;
/**
* Clone of {@link SortedNumericDocValues} for double values.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class SortedNumericDoubleValues {
/** Sole constructor. (For invocation by subclass
diff --git a/server/src/main/java/org/opensearch/index/mapper/ContentPath.java b/server/src/main/java/org/opensearch/index/mapper/ContentPath.java
index 8b0d5e24056d3..63e5731e2681b 100644
--- a/server/src/main/java/org/opensearch/index/mapper/ContentPath.java
+++ b/server/src/main/java/org/opensearch/index/mapper/ContentPath.java
@@ -32,11 +32,14 @@
package org.opensearch.index.mapper;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* JSON Path for a document / field
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ContentPath {
private static final char DELIMITER = '.';
diff --git a/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java b/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java
index bf14af809fbfd..827792cdb1091 100644
--- a/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java
+++ b/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java
@@ -33,6 +33,7 @@
package org.opensearch.index.mapper;
import org.apache.lucene.index.LeafReaderContext;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.index.fielddata.IndexFieldData;
import org.opensearch.search.DocValueFormat;
import org.opensearch.search.lookup.SourceLookup;
@@ -77,8 +78,9 @@ public List
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface IndexEventListener {
/**
diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShardState.java b/server/src/main/java/org/opensearch/index/shard/IndexShardState.java
index dc6f2fc3a86d9..deadf1db8314f 100644
--- a/server/src/main/java/org/opensearch/index/shard/IndexShardState.java
+++ b/server/src/main/java/org/opensearch/index/shard/IndexShardState.java
@@ -32,11 +32,14 @@
package org.opensearch.index.shard;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Index Shard States
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public enum IndexShardState {
CREATED((byte) 0),
RECOVERING((byte) 1),
diff --git a/server/src/main/java/org/opensearch/index/shard/ShardPath.java b/server/src/main/java/org/opensearch/index/shard/ShardPath.java
index b7bb4283eca32..d16e5707b2e0e 100644
--- a/server/src/main/java/org/opensearch/index/shard/ShardPath.java
+++ b/server/src/main/java/org/opensearch/index/shard/ShardPath.java
@@ -34,6 +34,7 @@
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.util.Strings;
import org.opensearch.cluster.metadata.IndexMetadata;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.util.io.IOUtils;
import org.opensearch.core.index.shard.ShardId;
import org.opensearch.core.xcontent.NamedXContentRegistry;
@@ -54,8 +55,9 @@
/**
* Path for a shard
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ShardPath {
public static final String INDEX_FOLDER_NAME = "index";
public static final String TRANSLOG_FOLDER_NAME = "translog";
diff --git a/server/src/main/java/org/opensearch/index/similarity/SimilarityProvider.java b/server/src/main/java/org/opensearch/index/similarity/SimilarityProvider.java
index 085e93c794fb7..33065dc1739a3 100644
--- a/server/src/main/java/org/opensearch/index/similarity/SimilarityProvider.java
+++ b/server/src/main/java/org/opensearch/index/similarity/SimilarityProvider.java
@@ -33,14 +33,16 @@
package org.opensearch.index.similarity;
import org.apache.lucene.search.similarities.Similarity;
+import org.opensearch.common.annotation.PublicApi;
import java.util.Objects;
/**
* Wrapper around a {@link Similarity} and its name.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class SimilarityProvider {
private final String name;
diff --git a/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java b/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java
index d48da6f462502..d844a7d2d25c4 100644
--- a/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java
+++ b/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java
@@ -32,21 +32,25 @@
package org.opensearch.index.snapshots;
+import org.opensearch.common.annotation.PublicApi;
+
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
/**
* Represent shard snapshot status
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class IndexShardSnapshotStatus {
/**
* Snapshot stage
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public enum Stage {
/**
* Snapshot hasn't started yet
@@ -248,8 +252,9 @@ public static IndexShardSnapshotStatus newDone(
/**
* Returns an immutable state of {@link IndexShardSnapshotStatus} at a given point in time.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class Copy {
private final Stage stage;
diff --git a/server/src/main/java/org/opensearch/index/store/Store.java b/server/src/main/java/org/opensearch/index/store/Store.java
index b822742de6e97..11505e82d5ccb 100644
--- a/server/src/main/java/org/opensearch/index/store/Store.java
+++ b/server/src/main/java/org/opensearch/index/store/Store.java
@@ -67,6 +67,7 @@
import org.opensearch.ExceptionsHelper;
import org.opensearch.common.UUIDs;
import org.opensearch.common.annotation.InternalApi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.io.stream.BytesStreamOutput;
import org.opensearch.common.logging.Loggers;
import org.opensearch.common.lucene.Lucene;
@@ -145,8 +146,9 @@
* }
*
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class Store extends AbstractIndexShardComponent implements Closeable, RefCounted {
/**
* This is an escape hatch for lucenes internal optimization that checks if the IndexInput is an instance of ByteBufferIndexInput
@@ -1022,8 +1024,9 @@ private void downloadFailed(long fileSize, long startTimeInMs) {
*
* @see StoreFileMetadata
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static final class MetadataSnapshot implements Iterable, Writeable {
private final Map metadata;
@@ -1429,8 +1432,9 @@ public String getSyncId() {
*
* @see MetadataSnapshot#recoveryDiff(org.opensearch.index.store.Store.MetadataSnapshot)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static final class RecoveryDiff {
/**
* Files that exist in both snapshots and they can be considered the same ie. they don't need to be recovered
diff --git a/server/src/main/java/org/opensearch/index/store/StoreFileMetadata.java b/server/src/main/java/org/opensearch/index/store/StoreFileMetadata.java
index f8c4df50afc8f..c286a5bdbd9d8 100644
--- a/server/src/main/java/org/opensearch/index/store/StoreFileMetadata.java
+++ b/server/src/main/java/org/opensearch/index/store/StoreFileMetadata.java
@@ -35,6 +35,7 @@
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.Version;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.lucene.store.ByteArrayIndexInput;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
@@ -47,8 +48,9 @@
/**
* Metadata for the store file
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class StoreFileMetadata implements Writeable {
private final String name;
diff --git a/server/src/main/java/org/opensearch/index/store/remote/filecache/CachedIndexInput.java b/server/src/main/java/org/opensearch/index/store/remote/filecache/CachedIndexInput.java
index a29598dbee505..b7dacb3761c33 100644
--- a/server/src/main/java/org/opensearch/index/store/remote/filecache/CachedIndexInput.java
+++ b/server/src/main/java/org/opensearch/index/store/remote/filecache/CachedIndexInput.java
@@ -9,6 +9,7 @@
package org.opensearch.index.store.remote.filecache;
import org.apache.lucene.store.IndexInput;
+import org.opensearch.common.annotation.PublicApi;
import java.io.IOException;
@@ -17,8 +18,9 @@
* {@link IndexInput}. Exactly how the IndexInput is created is determined by
* the implementations.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "2.7.0")
public interface CachedIndexInput extends AutoCloseable {
/**
* Gets the {@link IndexInput} this cache entry represents.
diff --git a/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java b/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
index dbbbbecbc6afd..2029b461674c7 100644
--- a/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
+++ b/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
@@ -9,6 +9,7 @@
package org.opensearch.index.store.remote.filecache;
import org.apache.lucene.store.IndexInput;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Setting;
import org.opensearch.core.common.breaker.CircuitBreaker;
import org.opensearch.core.common.breaker.CircuitBreakingException;
@@ -43,8 +44,9 @@
* items from cache tail and triggers a callback to clean up the file from disk. The
* cleanup process also includes closing file’s descriptor.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "2.7.0")
public class FileCache implements RefCountedCache {
private final SegmentedCache theCache;
diff --git a/server/src/main/java/org/opensearch/index/store/remote/utils/cache/CacheUsage.java b/server/src/main/java/org/opensearch/index/store/remote/utils/cache/CacheUsage.java
index 1cb9242926046..0b5480d3ca978 100644
--- a/server/src/main/java/org/opensearch/index/store/remote/utils/cache/CacheUsage.java
+++ b/server/src/main/java/org/opensearch/index/store/remote/utils/cache/CacheUsage.java
@@ -8,11 +8,14 @@
package org.opensearch.index.store.remote.utils.cache;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Usage metrics for {@link RefCountedCache}
*
* @opensearch.internal
*/
+@PublicApi(since = "2.7.0")
public class CacheUsage {
/**
* Cache usage of the system
diff --git a/server/src/main/java/org/opensearch/index/store/remote/utils/cache/stats/CacheStats.java b/server/src/main/java/org/opensearch/index/store/remote/utils/cache/stats/CacheStats.java
index f0a7154effb1d..55893752669a8 100644
--- a/server/src/main/java/org/opensearch/index/store/remote/utils/cache/stats/CacheStats.java
+++ b/server/src/main/java/org/opensearch/index/store/remote/utils/cache/stats/CacheStats.java
@@ -8,6 +8,7 @@
package org.opensearch.index.store.remote.utils.cache.stats;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.index.store.remote.utils.cache.RefCountedCache;
import java.util.Objects;
@@ -15,8 +16,9 @@
/**
* Statistics about the performance of a {@link RefCountedCache}.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "2.7.0")
public final class CacheStats {
private final long hitCount;
private final long missCount;
diff --git a/server/src/main/java/org/opensearch/index/translog/BufferedChecksumStreamOutput.java b/server/src/main/java/org/opensearch/index/translog/BufferedChecksumStreamOutput.java
index eaf9ac0893f1b..9e96664c79cc5 100644
--- a/server/src/main/java/org/opensearch/index/translog/BufferedChecksumStreamOutput.java
+++ b/server/src/main/java/org/opensearch/index/translog/BufferedChecksumStreamOutput.java
@@ -33,6 +33,7 @@
package org.opensearch.index.translog;
import org.apache.lucene.store.BufferedChecksum;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.io.stream.StreamOutput;
import java.io.IOException;
@@ -43,8 +44,9 @@
* Similar to Lucene's BufferedChecksumIndexOutput, however this wraps a
* {@link StreamOutput} so anything written will update the checksum
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class BufferedChecksumStreamOutput extends StreamOutput {
private final StreamOutput out;
private final Checksum digest;
diff --git a/server/src/main/java/org/opensearch/index/translog/ChannelFactory.java b/server/src/main/java/org/opensearch/index/translog/ChannelFactory.java
index f86b9dea0a5f7..4fba85b9d224d 100644
--- a/server/src/main/java/org/opensearch/index/translog/ChannelFactory.java
+++ b/server/src/main/java/org/opensearch/index/translog/ChannelFactory.java
@@ -31,6 +31,8 @@
package org.opensearch.index.translog;
+import org.opensearch.common.annotation.PublicApi;
+
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.file.OpenOption;
@@ -40,9 +42,10 @@
/**
* only for testing until we have a disk-full FileSystem
*
- * @opensearch.internal
+ * @opensearch.api
*/
@FunctionalInterface
+@PublicApi(since = "1.0.0")
public interface ChannelFactory {
default FileChannel open(Path path) throws IOException {
return open(path, StandardOpenOption.WRITE, StandardOpenOption.READ, StandardOpenOption.CREATE_NEW);
diff --git a/server/src/main/java/org/opensearch/index/translog/Translog.java b/server/src/main/java/org/opensearch/index/translog/Translog.java
index 9f80bc38a8222..8b4662238ed25 100644
--- a/server/src/main/java/org/opensearch/index/translog/Translog.java
+++ b/server/src/main/java/org/opensearch/index/translog/Translog.java
@@ -111,8 +111,9 @@
* operation etc. are still preserved.
*
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class Translog extends AbstractIndexShardComponent implements IndexShardComponent, Closeable {
/*
@@ -895,8 +896,9 @@ public TranslogDeletionPolicy getDeletionPolicy() {
/**
* Location in the translot
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class Location implements Comparable {
public final long generation;
@@ -954,8 +956,9 @@ public int hashCode() {
/**
* A snapshot of the transaction log, allows to iterate over all the transaction log operations.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public interface Snapshot extends Closeable {
/**
@@ -1040,14 +1043,16 @@ public void close() throws IOException {
* A generic interface representing an operation performed on the transaction log.
* Each is associated with a type.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public interface Operation {
/**
* The type of operation
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
enum Type {
@Deprecated
CREATE((byte) 1),
@@ -1138,8 +1143,9 @@ static void writeOperation(final StreamOutput output, final Operation operation)
/**
* The source in the translog
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static class Source {
public final BytesReference source;
@@ -1835,8 +1841,9 @@ void closeFilesIfNoPendingRetentionLocks() throws IOException {
/**
* References a transaction log generation
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public static final class TranslogGeneration {
public final String translogUUID;
public final long translogFileGeneration;
diff --git a/server/src/main/java/org/opensearch/index/translog/TranslogConfig.java b/server/src/main/java/org/opensearch/index/translog/TranslogConfig.java
index 6e75ebd847b5e..2f00773075d41 100644
--- a/server/src/main/java/org/opensearch/index/translog/TranslogConfig.java
+++ b/server/src/main/java/org/opensearch/index/translog/TranslogConfig.java
@@ -32,6 +32,7 @@
package org.opensearch.index.translog;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.util.BigArrays;
import org.opensearch.core.common.unit.ByteSizeUnit;
import org.opensearch.core.common.unit.ByteSizeValue;
@@ -45,8 +46,9 @@
* Once {@link Translog} has been created with this object, changes to this
* object will affect the {@link Translog} instance.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class TranslogConfig {
public static final ByteSizeValue DEFAULT_BUFFER_SIZE = new ByteSizeValue(1, ByteSizeUnit.MB);
diff --git a/server/src/main/java/org/opensearch/index/translog/TranslogDeletionPolicy.java b/server/src/main/java/org/opensearch/index/translog/TranslogDeletionPolicy.java
index 99784b77c61f5..972b19a029a8b 100644
--- a/server/src/main/java/org/opensearch/index/translog/TranslogDeletionPolicy.java
+++ b/server/src/main/java/org/opensearch/index/translog/TranslogDeletionPolicy.java
@@ -33,6 +33,7 @@
package org.opensearch.index.translog;
import org.apache.lucene.util.Counter;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.lease.Releasable;
import org.opensearch.core.Assertions;
import org.opensearch.index.seqno.SequenceNumbers;
@@ -47,8 +48,9 @@
/**
* Defines a translog deletion policy
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class TranslogDeletionPolicy {
private final Map