Class RoutingTable.Builder
java.lang.Object
org.elasticsearch.cluster.routing.RoutingTable.Builder
- Enclosing class:
- RoutingTable
Builder for the routing table. Note that build can only be called one time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(IndexRoutingTable indexRoutingTable)add(IndexRoutingTable.Builder indexRoutingTableBuilder)addAsFromCloseToOpen(IndexMetadata indexMetadata)addAsFromDangling(IndexMetadata indexMetadata)addAsFromOpenToClose(IndexMetadata indexMetadata)addAsNew(IndexMetadata indexMetadata)addAsNewRestore(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource, com.carrotsearch.hppc.IntSet ignoreShards)addAsRecovery(IndexMetadata indexMetadata)addAsRestore(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource)build()Builds the routing table.updateNodes(long version, RoutingNodes routingNodes)updateNumberOfReplicas(int numberOfReplicas, String[] indices)Update the number of replicas for the specified indices.version(long version)
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
updateNodes
-
updateNumberOfReplicas
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.
-