Class RoutingTable.Builder
java.lang.Object
org.elasticsearch.cluster.routing.RoutingTable.Builder
- Enclosing class:
- RoutingTable
public static class RoutingTable.Builder
extends java.lang.Object
Builder for the routing table. Note that build can only be called one time.
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(RoutingTable routingTable)
-
Method Summary
-
Constructor Details
-
Method Details
-
updateNodes
-
updateNumberOfReplicas
public RoutingTable.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
-
addAsNew
-
addAsRecovery
-
addAsFromDangling
-
addAsFromCloseToOpen
-
addAsFromOpenToClose
-
addAsRestore
public RoutingTable.Builder addAsRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource) -
addAsNewRestore
public RoutingTable.Builder addAsNewRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource, com.carrotsearch.hppc.IntSet ignoreShards) -
add
-
add
-
remove
-
version
-
build
Builds the routing table. Note that once this is called the builder must be thrown away. If you need to build a new RoutingTable as a copy of this one you'll need to build a new RoutingTable.Builder.
-