java.lang.Object
org.elasticsearch.cluster.metadata.Template
- All Implemented Interfaces:
Diffable<Template>
,SimpleDiffable<Template>
,Writeable
,ToXContent
,ToXContentObject
A template consists of optional settings, mappings, alias or lifecycle configuration for an index or data stream, however,
it is entirely independent of an index or data stream. It's a building block forming part of a regular index
template and a
ComponentTemplate
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>
Nested classes/interfaces inherited from interface org.elasticsearch.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
Fields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTY
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionTemplate
(StreamInput in) Template
(Settings settings, CompressedXContent mappings, Map<String, AliasMetadata> aliases) Template
(Settings settings, CompressedXContent mappings, Map<String, AliasMetadata> aliases, DataLifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionaliases()
boolean
int
hashCode()
mappings()
settings()
toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) toXContent
(XContentBuilder builder, ToXContent.Params params, RolloverConfiguration rolloverConfiguration) Converts the template to XContent and passes the RolloverConditions, when provided, to the lifecycle.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
Template
public Template(@Nullable Settings settings, @Nullable CompressedXContent mappings, @Nullable Map<String, AliasMetadata> aliases, @Nullable DataLifecycle lifecycle) -
Template
public Template(@Nullable Settings settings, @Nullable CompressedXContent mappings, @Nullable Map<String, AliasMetadata> aliases) -
Template
- Throws:
IOException
-
-
Method Details
-
settings
-
mappings
-
aliases
-
lifecycle
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params, @Nullable RolloverConfiguration rolloverConfiguration) throws IOException Converts the template to XContent and passes the RolloverConditions, when provided, to the lifecycle.- Throws:
IOException
-