Class IndexRoutingTable.Builder
- java.lang.Object
-
- org.elasticsearch.cluster.routing.IndexRoutingTable.Builder
-
- Enclosing class:
- IndexRoutingTable
public static class IndexRoutingTable.Builder extends java.lang.Object
-
-
Method Summary
Modifier and Type Method Description IndexRoutingTable.Builder
addIndexShard(IndexShardRoutingTable indexShard)
IndexRoutingTable.Builder
addReplica()
IndexRoutingTable.Builder
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.IndexRoutingTable
build()
IndexRoutingTable.Builder
initializeAsFromCloseToOpen(IndexMetaData indexMetaData)
Initializes a new empty index, as as a result of opening a closed index.IndexRoutingTable.Builder
initializeAsFromDangling(IndexMetaData indexMetaData)
Initializes a new index caused by dangling index imported.IndexRoutingTable.Builder
initializeAsNew(IndexMetaData indexMetaData)
Initializes a new empty index, as if it was created from an API.IndexRoutingTable.Builder
initializeAsNewRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource, com.carrotsearch.hppc.IntSet ignoreShards)
Initializes a new empty index, to be restored from a snapshotIndexRoutingTable.Builder
initializeAsRecovery(IndexMetaData indexMetaData)
Initializes an existing index.IndexRoutingTable.Builder
initializeAsRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource)
Initializes an existing index, to be restored from a snapshotIndexRoutingTable.Builder
removeReplica()
-
-
-
Constructor Detail
-
Builder
public Builder(Index index)
-
-
Method Detail
-
initializeAsNew
public IndexRoutingTable.Builder initializeAsNew(IndexMetaData indexMetaData)
Initializes a new empty index, as if it was created from an API.
-
initializeAsRecovery
public IndexRoutingTable.Builder initializeAsRecovery(IndexMetaData indexMetaData)
Initializes an existing index.
-
initializeAsFromDangling
public IndexRoutingTable.Builder initializeAsFromDangling(IndexMetaData indexMetaData)
Initializes a new index caused by dangling index imported.
-
initializeAsFromCloseToOpen
public IndexRoutingTable.Builder initializeAsFromCloseToOpen(IndexMetaData indexMetaData)
Initializes a new empty index, as as a result of opening a closed index.
-
initializeAsNewRestore
public IndexRoutingTable.Builder initializeAsNewRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource, com.carrotsearch.hppc.IntSet ignoreShards)
Initializes a new empty index, to be restored from a snapshot
-
initializeAsRestore
public IndexRoutingTable.Builder initializeAsRestore(IndexMetaData indexMetaData, RecoverySource.SnapshotRecoverySource recoverySource)
Initializes an existing index, to be restored from a snapshot
-
addReplica
public IndexRoutingTable.Builder addReplica()
-
removeReplica
public IndexRoutingTable.Builder removeReplica()
-
addIndexShard
public IndexRoutingTable.Builder addIndexShard(IndexShardRoutingTable indexShard)
-
addShard
public IndexRoutingTable.Builder 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
public IndexRoutingTable build()
-
-