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 java.lang.Object


Constructor Summary
IndexMetaData.Builder(IndexMetaData indexMetaData)
           
IndexMetaData.Builder(java.lang.String index)
           
 
Method Summary
 IndexMetaData build()
           
static IndexMetaData fromXContent(XContentParser parser, Settings globalSettings)
           
 java.lang.String index()
           
 int numberOfReplicas()
           
 IndexMetaData.Builder numberOfReplicas(int numberOfReplicas)
           
 int numberOfShards()
           
 IndexMetaData.Builder numberOfShards(int numberOfShards)
           
 IndexMetaData.Builder putMapping(MappingMetaData mappingMd)
           
 IndexMetaData.Builder putMapping(java.lang.String mappingType, java.lang.String mappingSource)
           
static IndexMetaData readFrom(StreamInput in, Settings globalSettings)
           
 IndexMetaData.Builder removeMapping(java.lang.String mappingType)
           
 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)
           
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(java.lang.String index)

IndexMetaData.Builder

public IndexMetaData.Builder(IndexMetaData indexMetaData)
Method Detail

index

public java.lang.String index()

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(java.lang.String mappingType)

putMapping

public IndexMetaData.Builder putMapping(MappingMetaData mappingMd)

putMapping

public IndexMetaData.Builder putMapping(java.lang.String mappingType,
                                        java.lang.String mappingSource)
                                 throws java.io.IOException
Throws:
java.io.IOException

state

public IndexMetaData.Builder state(IndexMetaData.State state)

build

public IndexMetaData build()

toXContent

public static void toXContent(IndexMetaData indexMetaData,
                              XContentBuilder builder,
                              ToXContent.Params params)
                       throws java.io.IOException
Throws:
java.io.IOException

fromXContent

public static IndexMetaData fromXContent(XContentParser parser,
                                         @Nullable
                                         Settings globalSettings)
                                  throws java.io.IOException
Throws:
java.io.IOException

readFrom

public static IndexMetaData readFrom(StreamInput in,
                                     Settings globalSettings)
                              throws java.io.IOException
Throws:
java.io.IOException

writeTo

public static void writeTo(IndexMetaData indexMetaData,
                           StreamOutput out)
                    throws java.io.IOException
Throws:
java.io.IOException