Package org.elasticsearch.indices.flush
Class SyncedFlushService
java.lang.Object
org.elasticsearch.indices.flush.SyncedFlushService
- All Implemented Interfaces:
IndexEventListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classResponse for third step of synced flush (writing the sync id) for one shard copy -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoidattemptSyncedFlush(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, beforeIndexShardRecovery, indexShardStateChanged, onStoreClosed, onStoreCreated, shardRoutingChanged
-
Field Details
-
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(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.
-