Package org.elasticsearch.indices.flush
Class SyncedFlushService
- java.lang.Object
-
- org.elasticsearch.indices.flush.SyncedFlushService
-
- All Implemented Interfaces:
IndexEventListener
public class SyncedFlushService extends java.lang.Object implements IndexEventListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyncedFlushService.InFlightOpsRequeststatic classSyncedFlushService.PreShardSyncedFlushRequeststatic classSyncedFlushService.ShardSyncedFlushRequeststatic classSyncedFlushService.ShardSyncedFlushResponseResponse for third step of synced flush (writing the sync id) for one shard copy
-
Constructor Summary
Constructors Constructor Description SyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver)
-
Method Summary
Modifier and Type Method Description voidattemptSyncedFlush(java.lang.String[] aliasesOrIndices, IndicesOptions indicesOptions, ActionListener<SyncedFlushResponse> listener)a utility method to perform a synced flush for all shards of multiple indices.voidattemptSyncedFlush(ShardId shardId, ActionListener<ShardsSyncedFlushResult> actionListener)protected voidgetInflightOpsCount(ShardId shardId, ClusterState state, IndexShardRoutingTable shardRoutingTable, ActionListener<org.elasticsearch.indices.flush.SyncedFlushService.InFlightOpsResponse> listener)returns the number of in flight operations on primary.voidonShardInactive(IndexShard indexShard)Called when a shard is marked as inactive-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.index.shard.IndexEventListener
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onStoreClosed, shardRoutingChanged
-
-
-
-
Constructor Detail
-
SyncedFlushService
@Inject public SyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Detail
-
onShardInactive
public void onShardInactive(IndexShard indexShard)
Description copied from interface:IndexEventListenerCalled when a shard is marked as inactive- Specified by:
onShardInactivein interfaceIndexEventListener- Parameters:
indexShard- The shard that was marked inactive
-
attemptSyncedFlush
public void attemptSyncedFlush(java.lang.String[] 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.
-
-