public class ShardStateAction extends AbstractComponent
Modifier and Type | Class and Description |
---|---|
static interface |
ShardStateAction.Listener |
static class |
ShardStateAction.NoLongerPrimaryShardException |
static class |
ShardStateAction.ShardRoutingEntry |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SHARD_FAILED_ACTION_NAME |
static java.lang.String |
SHARD_STARTED_ACTION_NAME |
deprecationLogger, logger, settings
Constructor and Description |
---|
ShardStateAction(Settings settings,
ClusterService clusterService,
TransportService transportService,
AllocationService allocationService,
RoutingService routingService,
ThreadPool threadPool) |
Modifier and Type | Method and Description |
---|---|
void |
shardFailed(ShardRouting shardRouting,
ShardRouting sourceShardRouting,
java.lang.String message,
java.lang.Throwable failure,
ShardStateAction.Listener listener)
Send a shard failed request to the master node to update the
cluster state.
|
void |
shardStarted(ShardRouting shardRouting,
java.lang.String message,
ShardStateAction.Listener listener) |
protected void |
waitForNewMasterAndRetry(java.lang.String actionName,
ClusterStateObserver observer,
ShardStateAction.ShardRoutingEntry shardRoutingEntry,
ShardStateAction.Listener listener) |
logDeprecatedSetting, logRemovedSetting, nodeName
public static final java.lang.String SHARD_STARTED_ACTION_NAME
public static final java.lang.String SHARD_FAILED_ACTION_NAME
@Inject public ShardStateAction(Settings settings, ClusterService clusterService, TransportService transportService, AllocationService allocationService, RoutingService routingService, ThreadPool threadPool)
public void shardFailed(ShardRouting shardRouting, ShardRouting sourceShardRouting, java.lang.String message, @Nullable java.lang.Throwable failure, ShardStateAction.Listener listener)
shardRouting
- the shard to failsourceShardRouting
- the source shard requesting the failure (must be the shard itself, or the primary shard)message
- the reason for the failurefailure
- the underlying cause of the failurelistener
- callback upon completion of the requestprotected void waitForNewMasterAndRetry(java.lang.String actionName, ClusterStateObserver observer, ShardStateAction.ShardRoutingEntry shardRoutingEntry, ShardStateAction.Listener listener)
public void shardStarted(ShardRouting shardRouting, java.lang.String message, ShardStateAction.Listener listener)