public final class IndexId extends java.lang.Object implements Writeable, ToXContent
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ID |
protected static java.lang.String |
NAME |
EMPTY_PARAMS
Constructor and Description |
---|
IndexId(StreamInput in) |
IndexId(java.lang.String name,
java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getId()
The unique ID for the index within the repository.
|
java.lang.String |
getName()
The name of the index.
|
int |
hashCode() |
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
protected static final java.lang.String NAME
protected static final java.lang.String ID
public IndexId(java.lang.String name, java.lang.String id)
public IndexId(StreamInput in) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
public java.lang.String getId()
Index.getUUID()
) because in the
case of snapshot/restore, the index UUID in the snapshotted index will be different
from the index UUID assigned to it when it is restored. Hence, the actual index UUID
is not useful in the context of snapshot/restore for tying a snapshotted index to the
index it was snapshot from, and so we are using a separate UUID here.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException