Class IndexTemplateV2
java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<IndexTemplateV2>
org.elasticsearch.cluster.metadata.IndexTemplateV2
- All Implemented Interfaces:
Diffable<IndexTemplateV2>
,Writeable
,ToXContent
,ToXContentObject
public class IndexTemplateV2 extends AbstractDiffable<IndexTemplateV2> implements ToXContentObject
An index template is comprised of a set of index patterns, an optional template, and a list of
ids corresponding to component templates that should be composed in order when creating a new
index.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IndexTemplateV2(java.util.List<java.lang.String> indexPatterns, Template template, java.util.List<java.lang.String> componentTemplates, java.lang.Long priority, java.lang.Long version, java.util.Map<java.lang.String,java.lang.Object> metadata)
IndexTemplateV2(StreamInput in)
-
Method Summary
Modifier and Type Method Description java.util.List<java.lang.String>
composedOf()
boolean
equals(java.lang.Object obj)
int
hashCode()
java.util.List<java.lang.String>
indexPatterns()
java.util.Map<java.lang.String,java.lang.Object>
metadata()
static IndexTemplateV2
parse(XContentParser parser)
java.lang.Long
priority()
Template
template()
java.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.Long
version()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Constructor Details
-
IndexTemplateV2
public IndexTemplateV2(java.util.List<java.lang.String> indexPatterns, @Nullable Template template, @Nullable java.util.List<java.lang.String> componentTemplates, @Nullable java.lang.Long priority, @Nullable java.lang.Long version, @Nullable java.util.Map<java.lang.String,java.lang.Object> metadata) -
IndexTemplateV2
- Throws:
java.io.IOException
-
-
Method Details
-
parse
- Throws:
java.io.IOException
-
indexPatterns
public java.util.List<java.lang.String> indexPatterns() -
template
-
composedOf
public java.util.List<java.lang.String> composedOf() -
priority
public java.lang.Long priority() -
version
public java.lang.Long version() -
metadata
public java.util.Map<java.lang.String,java.lang.Object> metadata() -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-