Class MetaData.Builder
- java.lang.Object
-
- org.elasticsearch.cluster.metadata.MetaData.Builder
-
- Enclosing class:
- MetaData
public static class MetaData.Builder extends java.lang.Object
-
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(MetaData metaData)
-
-
Method Detail
-
put
public MetaData.Builder put(IndexMetaData.Builder indexMetaDataBuilder)
-
put
public MetaData.Builder put(IndexMetaData indexMetaData, boolean incrementVersion)
-
get
public IndexMetaData get(java.lang.String index)
-
getSafe
public IndexMetaData getSafe(Index index)
-
remove
public MetaData.Builder remove(java.lang.String index)
-
removeAllIndices
public MetaData.Builder removeAllIndices()
-
indices
public MetaData.Builder indices(ImmutableOpenMap<java.lang.String,IndexMetaData> indices)
-
put
public MetaData.Builder put(IndexTemplateMetaData.Builder template)
-
put
public MetaData.Builder put(IndexTemplateMetaData template)
-
removeTemplate
public MetaData.Builder removeTemplate(java.lang.String templateName)
-
templates
public MetaData.Builder templates(ImmutableOpenMap<java.lang.String,IndexTemplateMetaData> templates)
-
getCustom
public MetaData.Custom getCustom(java.lang.String type)
-
putCustom
public MetaData.Builder putCustom(java.lang.String type, MetaData.Custom custom)
-
removeCustom
public MetaData.Builder removeCustom(java.lang.String type)
-
customs
public MetaData.Builder customs(ImmutableOpenMap<java.lang.String,MetaData.Custom> customs)
-
indexGraveyard
public MetaData.Builder indexGraveyard(IndexGraveyard indexGraveyard)
-
indexGraveyard
public IndexGraveyard indexGraveyard()
-
updateSettings
public MetaData.Builder updateSettings(Settings settings, java.lang.String... indices)
-
updateNumberOfReplicas
public MetaData.Builder updateNumberOfReplicas(int numberOfReplicas, java.lang.String[] indices)
Update the number of replicas for the specified indices.- Parameters:
numberOfReplicas
- the number of replicasindices
- the indices to update the number of replicas for- Returns:
- the builder
-
transientSettings
public Settings transientSettings()
-
transientSettings
public MetaData.Builder transientSettings(Settings settings)
-
persistentSettings
public Settings persistentSettings()
-
persistentSettings
public MetaData.Builder persistentSettings(Settings settings)
-
version
public MetaData.Builder version(long version)
-
clusterUUID
public MetaData.Builder clusterUUID(java.lang.String clusterUUID)
-
generateClusterUuidIfNeeded
public MetaData.Builder generateClusterUuidIfNeeded()
-
build
public MetaData build()
-
toXContent
public static java.lang.String toXContent(MetaData metaData) throws java.io.IOException
- Throws:
java.io.IOException
-
toXContent
public static void toXContent(MetaData metaData, XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
fromXContent
public static MetaData fromXContent(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
-