org.elasticsearch.cluster.metadata
Class IndexMetaData.Builder
java.lang.Object
org.elasticsearch.cluster.metadata.IndexMetaData.Builder
- Enclosing class:
- IndexMetaData
public static class IndexMetaData.Builder
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexMetaData.Builder
public IndexMetaData.Builder(String index)
IndexMetaData.Builder
public IndexMetaData.Builder(IndexMetaData indexMetaData)
index
public String index()
index
public IndexMetaData.Builder index(String name)
numberOfShards
public IndexMetaData.Builder numberOfShards(int numberOfShards)
numberOfShards
public int numberOfShards()
numberOfReplicas
public IndexMetaData.Builder numberOfReplicas(int numberOfReplicas)
numberOfReplicas
public int numberOfReplicas()
settings
public IndexMetaData.Builder settings(Settings.Builder settings)
settings
public IndexMetaData.Builder settings(Settings settings)
removeMapping
public IndexMetaData.Builder removeMapping(String mappingType)
putMapping
public IndexMetaData.Builder putMapping(String type,
String source)
throws IOException
- Throws:
IOException
putMapping
public IndexMetaData.Builder putMapping(MappingMetaData mappingMd)
state
public IndexMetaData.Builder state(IndexMetaData.State state)
putAlias
public IndexMetaData.Builder putAlias(AliasMetaData aliasMetaData)
putAlias
public IndexMetaData.Builder putAlias(AliasMetaData.Builder aliasMetaData)
removerAlias
public IndexMetaData.Builder removerAlias(String alias)
putCustom
public IndexMetaData.Builder putCustom(String type,
IndexMetaData.Custom customIndexMetaData)
removeCustom
public IndexMetaData.Builder removeCustom(String type)
getCustom
public IndexMetaData.Custom getCustom(String type)
version
public long version()
version
public IndexMetaData.Builder version(long version)
build
public IndexMetaData build()
toXContent
public static void toXContent(IndexMetaData indexMetaData,
XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Throws:
IOException
fromXContent
public static IndexMetaData fromXContent(XContentParser parser)
throws IOException
- Throws:
IOException
readFrom
public static IndexMetaData readFrom(StreamInput in)
throws IOException
- Throws:
IOException
writeTo
public static void writeTo(IndexMetaData indexMetaData,
StreamOutput out)
throws IOException
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.