public static class IndexRoutingTable.Builder extends Object
Modifier and Type | Method and Description |
---|---|
IndexRoutingTable.Builder |
addIndexShard(IndexShardRoutingTable indexShard) |
IndexRoutingTable.Builder |
addReplica() |
IndexRoutingTable.Builder |
addShard(IndexShardRoutingTable refData,
ShardRouting shard)
Adds a new shard routing (makes a copy of it), with reference data used from the index shard routing table
if it needs to be created.
|
IndexRoutingTable |
build() |
IndexRoutingTable.Builder |
clearPostAllocationFlag(ShardId shardId)
Clears the post allocation flag for the specified shard
|
IndexRoutingTable.Builder |
initializeAsNew(IndexMetaData indexMetaData)
Initializes a new empty index, as if it was created from an API.
|
IndexRoutingTable.Builder |
initializeAsNewRestore(IndexMetaData indexMetaData,
RestoreSource restoreSource,
com.carrotsearch.hppc.IntSet ignoreShards)
Initializes a new empty index, to be restored from a snapshot
|
IndexRoutingTable.Builder |
initializeAsRecovery(IndexMetaData indexMetaData)
Initializes a new empty index, as if it was created from an API.
|
IndexRoutingTable.Builder |
initializeAsRestore(IndexMetaData indexMetaData,
RestoreSource restoreSource)
Initializes an existing index, to be restored from a snapshot
|
static IndexRoutingTable |
readFrom(StreamInput in)
Reads an
IndexRoutingTable from an StreamInput |
IndexRoutingTable.Builder |
removeReplica() |
static void |
writeTo(IndexRoutingTable index,
StreamOutput out)
Writes an
IndexRoutingTable to a StreamOutput . |
public Builder(String index)
public static IndexRoutingTable readFrom(StreamInput in) throws IOException
IndexRoutingTable
from an StreamInput
in
- StreamInput
to read the IndexRoutingTable
fromIndexRoutingTable
readIOException
- if something happens during readpublic static void writeTo(IndexRoutingTable index, StreamOutput out) throws IOException
IndexRoutingTable
to a StreamOutput
.index
- IndexRoutingTable
to writeout
- StreamOutput
to write toIOException
- if something happens during writepublic IndexRoutingTable.Builder initializeAsNew(IndexMetaData indexMetaData)
public IndexRoutingTable.Builder initializeAsRecovery(IndexMetaData indexMetaData)
public IndexRoutingTable.Builder initializeAsNewRestore(IndexMetaData indexMetaData, RestoreSource restoreSource, com.carrotsearch.hppc.IntSet ignoreShards)
public IndexRoutingTable.Builder initializeAsRestore(IndexMetaData indexMetaData, RestoreSource restoreSource)
public IndexRoutingTable.Builder addReplica()
public IndexRoutingTable.Builder removeReplica()
public IndexRoutingTable.Builder addIndexShard(IndexShardRoutingTable indexShard)
public IndexRoutingTable.Builder clearPostAllocationFlag(ShardId shardId)
public IndexRoutingTable.Builder addShard(IndexShardRoutingTable refData, ShardRouting shard)
public IndexRoutingTable build() throws RoutingValidationException
RoutingValidationException
Copyright © 2009–2015. All rights reserved.