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 -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSYNCED_FLUSH_DEPRECATION_MESSAGE -
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 inactiveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.shard.IndexEventListener
afterIndexCreated, afterIndexRemoved, afterIndexShardClosed, afterIndexShardCreated, afterIndexShardDeleted, afterIndexShardStarted, beforeIndexAddedToCluster, beforeIndexCreated, beforeIndexRemoved, beforeIndexShardClosed, beforeIndexShardCreated, beforeIndexShardDeleted, indexShardStateChanged, onStoreClosed, onStoreCreated, shardRoutingChanged
-
Field Details
-
SYNCED_FLUSH_DEPRECATION_MESSAGE
public static final java.lang.String 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: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.
-