org.elasticsearch.cluster.metadata
Class IndexMetaData.Builder

java.lang.Object
  extended by org.elasticsearch.cluster.metadata.IndexMetaData.Builder
Enclosing class:
IndexMetaData

public static class IndexMetaData.Builder
extends Object


Constructor Summary
IndexMetaData.Builder(IndexMetaData indexMetaData)
           
IndexMetaData.Builder(String index)
           
 
Method Summary
 IndexMetaData build()
           
static IndexMetaData fromXContent(XContentParser parser)
           
 IndexMetaData.Custom getCustom(String type)
           
 String index()
           
 IndexMetaData.Builder index(String name)
           
 int numberOfReplicas()
           
 IndexMetaData.Builder numberOfReplicas(int numberOfReplicas)
           
 int numberOfShards()
           
 IndexMetaData.Builder numberOfShards(int numberOfShards)
           
 IndexMetaData.Builder putAlias(AliasMetaData.Builder aliasMetaData)
           
 IndexMetaData.Builder putAlias(AliasMetaData aliasMetaData)
           
 IndexMetaData.Builder putCustom(String type, IndexMetaData.Custom customIndexMetaData)
           
 IndexMetaData.Builder putMapping(MappingMetaData mappingMd)
           
 IndexMetaData.Builder putMapping(String type, String source)
           
static IndexMetaData readFrom(StreamInput in)
           
 IndexMetaData.Builder removeCustom(String type)
           
 IndexMetaData.Builder removeMapping(String mappingType)
           
 IndexMetaData.Builder removerAlias(String alias)
           
 IndexMetaData.Builder settings(Settings.Builder settings)
           
 IndexMetaData.Builder settings(Settings settings)
           
 IndexMetaData.Builder state(IndexMetaData.State state)
           
static void toXContent(IndexMetaData indexMetaData, XContentBuilder builder, ToXContent.Params params)
           
 long version()
           
 IndexMetaData.Builder version(long version)
           
static void writeTo(IndexMetaData indexMetaData, StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexMetaData.Builder

public IndexMetaData.Builder(String index)

IndexMetaData.Builder

public IndexMetaData.Builder(IndexMetaData indexMetaData)
Method Detail

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.