From 6112f4b14c2e3175fdcdd15afa2d86be8ad64be6 Mon Sep 17 00:00:00 2001 From: Aman Khare Date: Fri, 15 Mar 2024 16:49:15 +0530 Subject: [PATCH] Add java doc on new class Signed-off-by: Aman Khare --- .../gateway/TransportNodesGatewayStartedShardHelper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/main/java/org/opensearch/gateway/TransportNodesGatewayStartedShardHelper.java b/server/src/main/java/org/opensearch/gateway/TransportNodesGatewayStartedShardHelper.java index 5168cac6f920b..d08291de2eac5 100644 --- a/server/src/main/java/org/opensearch/gateway/TransportNodesGatewayStartedShardHelper.java +++ b/server/src/main/java/org/opensearch/gateway/TransportNodesGatewayStartedShardHelper.java @@ -232,6 +232,14 @@ public String toString() { } } + /** + * This class extends the {@link GatewayShardStarted} which contains all necessary shard metadata like + * allocationId and replication checkpoint. It also has DiscoveryNode which is needed by + * {@link PrimaryShardAllocator} and {@link PrimaryShardBatchAllocator} to make allocation decision. + * This class removes the dependency of + * {@link TransportNodesListGatewayStartedShards.NodeGatewayStartedShards} to make allocation decisions by + * {@link PrimaryShardAllocator} or {@link PrimaryShardBatchAllocator}. + */ public static class NodeGatewayShardStarted extends GatewayShardStarted { private final DiscoveryNode node;