diff --git a/server/src/main/java/org/opensearch/common/util/CompactBytesRefHash.java b/server/src/main/java/org/opensearch/common/util/CompactBytesRefHash.java index ffb50f3b2da52..5099649868842 100644 --- a/server/src/main/java/org/opensearch/common/util/CompactBytesRefHash.java +++ b/server/src/main/java/org/opensearch/common/util/CompactBytesRefHash.java @@ -15,7 +15,7 @@ import org.opensearch.core.common.util.ByteArray; /** - * Specialized hash table implementation that maps a BytesRef key to a long ordinal. + * Specialized hash table implementation that maps a {@link BytesRef} key to a long ordinal. * *
* It uses a compact byte-packing strategy to encode the ordinal and fingerprint information @@ -44,7 +44,7 @@ public class CompactBytesRefHash implements Releasable { private final float loadFactor; /** - * Calculates the hash of a BytesRef key. + * Calculates the hash of a {@link BytesRef} key. */ private final Hasher hasher; @@ -271,6 +271,9 @@ public void close() { Releasables.close(table, offsets, keys); } + /** + * Hasher calculates the hash of a {@link BytesRef} key. + */ @FunctionalInterface public interface Hasher { long hash(BytesRef key); diff --git a/server/src/main/java/org/opensearch/common/util/ReorganizingBytesRefHash.java b/server/src/main/java/org/opensearch/common/util/ReorganizingBytesRefHash.java index 6de2d9283dc85..d00d58ec1b627 100644 --- a/server/src/main/java/org/opensearch/common/util/ReorganizingBytesRefHash.java +++ b/server/src/main/java/org/opensearch/common/util/ReorganizingBytesRefHash.java @@ -15,7 +15,7 @@ import org.opensearch.core.common.util.ByteArray; /** - * Specialized hash table implementation that maps a BytesRef key to a long ordinal. + * Specialized hash table implementation that maps a {@link BytesRef} key to a long ordinal. * *
* It organizes itself by moving keys around dynamically in order to reduce the @@ -47,7 +47,7 @@ public class ReorganizingBytesRefHash implements Releasable { private final float loadFactor; /** - * Calculates the hash of a BytesRef key. + * Calculates the hash of a {@link BytesRef} key. */ private final Hasher hasher; @@ -278,6 +278,9 @@ public void close() { Releasables.close(table, offsets, keys); } + /** + * Hasher calculates the hash of a {@link BytesRef} key. + */ @FunctionalInterface public interface Hasher { long hash(BytesRef key);