Skip to content

Commit

Permalink
Incorporating PR feedback on javadocs
Browse files Browse the repository at this point in the history
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
  • Loading branch information
kartg committed Jun 3, 2022
1 parent 7075793 commit 71e66de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/main/java/org/opensearch/index/store/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public MetadataSnapshot getMetadata(IndexCommit commit) throws IOException {
}

/**
* Conveience wrapper around the {@link #getMetadata(IndexCommit)} method for null input.
* Convenience wrapper around the {@link #getMetadata(IndexCommit)} method for null input.
*/
public MetadataSnapshot getMetadata() throws IOException {
return getMetadata(null, false);
Expand Down Expand Up @@ -322,6 +322,12 @@ public MetadataSnapshot getMetadata(IndexCommit commit, boolean lockDirectory) t
}
}

/**
* Returns a new {@link MetadataSnapshot} for the given {@link SegmentInfos} object.
* In contrast to {@link #getMetadata(IndexCommit)}, this method is useful for scenarios
* where we need to construct a MetadataSnapshot from an in-memory SegmentInfos object that
* may not have a IndexCommit associated with it, such as with segment replication.
*/
public MetadataSnapshot getMetadata(SegmentInfos segmentInfos) throws IOException {
return new MetadataSnapshot(segmentInfos, directory, logger);
}
Expand Down

0 comments on commit 71e66de

Please sign in to comment.