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 class
SyncedFlushService.InFlightOpsRequest
static class
SyncedFlushService.PreShardSyncedFlushRequest
static class
SyncedFlushService.ShardSyncedFlushRequest
static class
SyncedFlushService.ShardSyncedFlushResponse
Response 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.String
SYNCED_FLUSH_DEPRECATION_MESSAGE
-
Constructor Summary
Constructors Constructor Description SyncedFlushService(IndicesService indicesService, ClusterService clusterService, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver)
-
Method Summary
Modifier and Type Method Description 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.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.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, 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: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(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.
-