Class RepositoryMetadata
java.lang.Object
org.elasticsearch.cluster.metadata.RepositoryMetadata
- All Implemented Interfaces:
 Writeable
Metadata about registered repository
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionRepositoryMetadata(String name, String uuid, String type, Settings settings, long generation, long pendingGeneration)RepositoryMetadata(String name, String type, Settings settings)Constructs new repository metadataRepositoryMetadata(RepositoryMetadata metadata, long generation, long pendingGeneration) - 
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanChecks if this instance is equal to the other instance in all fields other thangenerationandpendingGeneration.longReturns the safe repository generation.inthashCode()name()Returns repository namelongReturns the pending repository generation.settings()Returns repository settingstoString()type()Returns repository typeuuid()Return the repository UUID, if set and known.withSettings(Settings settings)voidwriteTo(StreamOutput out)Writes repository metadata to stream output 
- 
Field Details
- 
REPO_GEN_IN_CS_VERSION
 
 - 
 - 
Constructor Details
- 
RepositoryMetadata
Constructs new repository metadata- Parameters:
 name- repository nametype- repository typesettings- repository settings
 - 
RepositoryMetadata
 - 
RepositoryMetadata
 - 
RepositoryMetadata
- Throws:
 IOException
 
 - 
 - 
Method Details
- 
name
Returns repository name- Returns:
 - repository name
 
 - 
type
Returns repository type- Returns:
 - repository type
 
 - 
uuid
Return the repository UUID, if set and known. The repository UUID is stored in the repository and typically populated here when the repository is registered or when we write to it. It may not be set if the repository is maintaining support for versions beforeSnapshotsService.UUIDS_IN_REPO_DATA_VERSION. It may not be known if the repository was registered with?verify=falseand has had no subsequent writes. Consumers may, if desired, try and fill in a missing value themselves by retrieving theRepositoryDataand callingRepositoriesService.updateRepositoryUuidInMetadata(org.elasticsearch.cluster.service.ClusterService, java.lang.String, org.elasticsearch.repositories.RepositoryData, org.elasticsearch.action.ActionListener<java.lang.Void>).- Returns:
 - repository UUID, or 
RepositoryData.MISSING_UUIDif the UUID is not set or not known. 
 - 
settings
Returns repository settings- Returns:
 - repository settings
 
 - 
generation
public long generation()Returns the safe repository generation.RepositoryDatafor this generation is assumed to exist in the repository. All operations on the repository must be based on theRepositoryDataat this generation. See package level documentation for the blob store based repositoriesorg.elasticsearch.repositories.blobstorefor details on how this value is used during snapshots.- Returns:
 - safe repository generation
 
 - 
pendingGeneration
public long pendingGeneration()Returns the pending repository generation.RepositoryDatafor this generation and all generations down to the safe generationgenerationmay exist in the repository and should not be reused for writing newRepositoryDatato the repository. See package level documentation for the blob store based repositoriesorg.elasticsearch.repositories.blobstorefor details on how this value is used during snapshots.- Returns:
 - highest pending repository generation
 
 - 
writeTo
Writes repository metadata to stream output- Specified by:
 writeToin interfaceWriteable- Parameters:
 out- stream output- Throws:
 IOException
 - 
equalsIgnoreGenerations
Checks if this instance is equal to the other instance in all fields other thangenerationandpendingGeneration.- Parameters:
 other- other repository metadata- Returns:
 trueif both instances equal in all fields but the generation fields
 - 
equals
 - 
hashCode
public int hashCode() - 
toString
 - 
withUuid
 - 
withSettings
 
 -