Module org.elasticsearch.server
Class IndexRoutingTable.Builder
java.lang.Object
org.elasticsearch.cluster.routing.IndexRoutingTable.Builder
- Enclosing class:
- IndexRoutingTable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddIndexShard
(IndexShardRoutingTable.Builder indexShard) addReplica
(ShardRouting.Role role) addShard
(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.build()
initializeAsFromCloseToOpen
(IndexMetadata indexMetadata, IndexRoutingTable indexRoutingTable) Initializes a new empty index, as a result of opening a closed index.initializeAsFromDangling
(IndexMetadata indexMetadata) Initializes a new index caused by dangling index imported.initializeAsFromOpenToClose
(IndexMetadata indexMetadata, IndexRoutingTable indexRoutingTable) Initializes a new empty index, as a result of closing an opened index.initializeAsNew
(IndexMetadata indexMetadata) Initializes a new empty index, as if it was created from an API.initializeAsNewRestore
(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource, Set<Integer> ignoreShards) Initializes a new empty index, to be restored from a snapshotinitializeAsRecovery
(IndexMetadata indexMetadata) Initializes an existing index.initializeAsRestore
(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource, IndexRoutingTable previousIndexRoutingTable) Initializes an existing index, to be restored from a snapshot
-
Constructor Details
-
Builder
-
-
Method Details
-
initializeAsNew
Initializes a new empty index, as if it was created from an API. -
initializeAsRecovery
Initializes an existing index. -
initializeAsFromDangling
Initializes a new index caused by dangling index imported. -
initializeAsFromCloseToOpen
public IndexRoutingTable.Builder initializeAsFromCloseToOpen(IndexMetadata indexMetadata, IndexRoutingTable indexRoutingTable) Initializes a new empty index, as a result of opening a closed index. -
initializeAsFromOpenToClose
public IndexRoutingTable.Builder initializeAsFromOpenToClose(IndexMetadata indexMetadata, IndexRoutingTable indexRoutingTable) Initializes a new empty index, as a result of closing an opened index. -
initializeAsNewRestore
public IndexRoutingTable.Builder initializeAsNewRestore(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource, Set<Integer> ignoreShards) Initializes a new empty index, to be restored from a snapshot -
initializeAsRestore
public IndexRoutingTable.Builder initializeAsRestore(IndexMetadata indexMetadata, RecoverySource.SnapshotRecoverySource recoverySource, IndexRoutingTable previousIndexRoutingTable) Initializes an existing index, to be restored from a snapshot -
addReplica
-
removeReplica
-
addIndexShard
-
addShard
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. -
build
-