Skip to content

Commit

Permalink
Fixing inline javadocs usage in PaginationStrategy (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#16428)

Signed-off-by: Harsh Garg <[email protected]>
Co-authored-by: Harsh Garg <[email protected]>
  • Loading branch information
gargharsh3134 and Harsh Garg authored Oct 22, 2024
1 parent 1982427 commit 20e233e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ public interface PaginationStrategy<T> {
List<T> getRequestedEntities();

/**
*
* Utility method to get list of indices filtered as per {@param filterPredicate} and the sorted according to {@param comparator}.
* Utility method to get list of indices filtered and sorted as per the provided parameters.
* @param clusterState state consisting of all the indices to be filtered and sorted.
* @param filterPredicate predicate to be used for filtering out the required indices.
* @param comparator comparator to be used for sorting the already filtered list of indices.
* @return list of filtered and sorted IndexMetadata.
*/
static List<IndexMetadata> getSortedIndexMetadata(
final ClusterState clusterState,
Expand All @@ -56,8 +59,10 @@ static List<IndexMetadata> getSortedIndexMetadata(
}

/**
*
* Utility method to get list of indices sorted as per {@param comparator}.
* Utility method to get list of sorted indices.
* @param clusterState state consisting of indices to be sorted.
* @param comparator comparator to be used for sorting the list of indices.
* @return list of sorted IndexMetadata.
*/
static List<IndexMetadata> getSortedIndexMetadata(final ClusterState clusterState, Comparator<IndexMetadata> comparator) {
return clusterState.metadata().indices().values().stream().sorted(comparator).collect(Collectors.toList());
Expand Down

0 comments on commit 20e233e

Please sign in to comment.