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.ParamsNested 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()booleanequals(java.lang.Object obj)inthashCode()java.util.List<java.lang.String>indexPatterns()java.util.Map<java.lang.String,java.lang.Object>metadata()static IndexTemplateV2parse(XContentParser parser)java.lang.Longpriority()Templatetemplate()java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.Longversion()voidwriteTo(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:WriteableWrite this into the StreamOutput. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-