Package org.elasticsearch.indices.flush
Class SyncedFlushService
org.elasticsearch.indices.flush.SyncedFlushService
- All Implemented Interfaces:
IndexEventListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
Response for third step of synced flush (writing the sync id) for one shard copy -
Field Summary
-
Constructor Summary
ConstructorDescriptionSyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
[] aliasesOrIndices, IndicesOptions indicesOptions, ActionListener<SyncedFlushResponse> listener)
a utility method to perform a synced flush for all shards of multiple indices.void
attemptSyncedFlush(ShardId shardId, ActionListener<ShardsSyncedFlushResult> actionListener)
protected void
getInflightOpsCount(ShardId shardId, ClusterState state, IndexShardRoutingTable shardRoutingTable, ActionListener<org.elasticsearch.indices.flush.SyncedFlushService.InFlightOpsResponse> listener)
returns the number of in flight operations on primary.void
onShardInactive(IndexShard indexShard)
Called when a shard is marked as inactiveMethods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from interface org.elasticsearch.index.shard.IndexEventListener
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, beforeIndexShardRecovery, indexShardStateChanged, onStoreClosed, onStoreCreated, shardRoutingChanged
-
Field Details
-
SYNCED_FLUSH_DEPRECATION_MESSAGE
public static final SYNCED_FLUSH_DEPRECATION_MESSAGE- See Also:
- Constant Field Values
-
-
Constructor Details
-
SyncedFlushService
@Inject public SyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Details
-
onShardInactive
Description copied from interface:IndexEventListener
Called when a shard is marked as inactive- Specified by:
onShardInactive
in interfaceIndexEventListener
- Parameters:
indexShard
- The shard that was marked inactive
-
attemptSyncedFlush
public void attemptSyncedFlush([] aliasesOrIndices, IndicesOptions indicesOptions, ActionListener<SyncedFlushResponse> listener)a utility method to perform a synced flush for all shards of multiple indices. seeattemptSyncedFlush(ShardId, ActionListener)
for more details. -
attemptSyncedFlush
public void attemptSyncedFlush(ShardId shardId, ActionListener<ShardsSyncedFlushResult> actionListener) -
getInflightOpsCount
protected void getInflightOpsCount(ShardId shardId, ClusterState state, IndexShardRoutingTable shardRoutingTable, ActionListener<org.elasticsearch.indices.flush.SyncedFlushService.InFlightOpsResponse> listener)returns the number of in flight operations on primary. -1 upon error.
-