Make Snapshot Metadata Javadocs Clearer (#49697) (#49771)

We are always using the snapshot name on the shard level,
lets make it crystal clear in the docs.
This commit is contained in:
Armin Braun 2019-12-02 19:14:34 +01:00 committed by GitHub
parent 96f14fcfbd
commit 5f766a66fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View File

@ -337,6 +337,9 @@ public class BlobStoreIndexShardSnapshot implements ToXContentFragment {
}
}
/**
* Snapshot name
*/
private final String snapshot;
private final long indexVersion;
@ -354,7 +357,7 @@ public class BlobStoreIndexShardSnapshot implements ToXContentFragment {
/**
* Constructs new shard snapshot metadata from snapshot metadata
*
* @param snapshot snapshot id
* @param snapshot snapshot name
* @param indexVersion index version
* @param indexFiles list of files in the shard
* @param startTime snapshot start time
@ -379,18 +382,9 @@ public class BlobStoreIndexShardSnapshot implements ToXContentFragment {
}
/**
* Returns index version
* Returns snapshot name
*
* @return index version
*/
public long indexVersion() {
return indexVersion;
}
/**
* Returns snapshot id
*
* @return snapshot id
* @return snapshot name
*/
public String snapshot() {
return snapshot;

View File

@ -35,10 +35,19 @@ public class SnapshotFiles {
private Map<String, FileInfo> physicalFiles = null;
/**
* Returns snapshot name
*
* @return snapshot name
*/
public String snapshot() {
return snapshot;
}
/**
* @param snapshot snapshot name
* @param indexFiles index files
*/
public SnapshotFiles(String snapshot, List<FileInfo> indexFiles ) {
this.snapshot = snapshot;
this.indexFiles = indexFiles;