public final class RepositoryData extends java.lang.Object implements ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static RepositoryData |
EMPTY |
EMPTY_PARAMS
Constructor and Description |
---|
RepositoryData(java.util.List<SnapshotId> snapshotIds,
java.util.Map<IndexId,java.util.Set<SnapshotId>> indexSnapshots) |
Modifier and Type | Method and Description |
---|---|
RepositoryData |
addSnapshot(SnapshotId snapshotId,
java.util.List<IndexId> snapshottedIndices)
Add a snapshot and its indices to the repository; returns a new instance.
|
protected RepositoryData |
copy() |
boolean |
equals(java.lang.Object obj) |
static RepositoryData |
fromXContent(XContentParser parser) |
java.util.Map<java.lang.String,IndexId> |
getIndices()
Returns an unmodifiable map of the index names to
IndexId in the repository. |
java.util.List<SnapshotId> |
getSnapshotIds()
Returns an unmodifiable list of the snapshot ids.
|
java.util.Set<SnapshotId> |
getSnapshots(IndexId indexId)
Returns an immutable collection of the snapshot ids for the snapshots that contain the given index.
|
int |
hashCode() |
RepositoryData |
initIndices(java.util.Map<IndexId,java.util.Set<SnapshotId>> indexSnapshots)
Initializes the indices in the repository metadata; returns a new instance.
|
RepositoryData |
removeSnapshot(SnapshotId snapshotId)
Remove a snapshot and remove any indices that no longer exist in the repository due to the deletion of the snapshot.
|
IndexId |
resolveIndexId(java.lang.String indexName)
Resolve the index name to the index id specific to the repository,
throwing an exception if the index could not be resolved.
|
java.util.List<IndexId> |
resolveIndices(java.util.List<java.lang.String> indices)
Resolve the given index names to index ids.
|
java.util.List<IndexId> |
resolveNewIndices(java.util.List<java.lang.String> indicesToResolve)
Resolve the given index names to index ids, creating new index ids for
new indices in the repository.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
public static final RepositoryData EMPTY
public RepositoryData(java.util.List<SnapshotId> snapshotIds, java.util.Map<IndexId,java.util.Set<SnapshotId>> indexSnapshots)
protected RepositoryData copy()
public java.util.List<SnapshotId> getSnapshotIds()
public java.util.Map<java.lang.String,IndexId> getIndices()
IndexId
in the repository.public RepositoryData addSnapshot(SnapshotId snapshotId, java.util.List<IndexId> snapshottedIndices)
public RepositoryData initIndices(java.util.Map<IndexId,java.util.Set<SnapshotId>> indexSnapshots)
public RepositoryData removeSnapshot(SnapshotId snapshotId)
public java.util.Set<SnapshotId> getSnapshots(IndexId indexId)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public IndexId resolveIndexId(java.lang.String indexName)
public java.util.List<IndexId> resolveIndices(java.util.List<java.lang.String> indices)
public java.util.List<IndexId> resolveNewIndices(java.util.List<java.lang.String> indicesToResolve)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public static RepositoryData fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException