Class PeerRecoverySourceService
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.indices.recovery.PeerRecoverySourceService
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ClusterStateListener
,LifecycleComponent
,org.elasticsearch.core.Releasable
,IndexEventListener
public class PeerRecoverySourceService
extends AbstractLifecycleComponent
implements IndexEventListener, ClusterStateListener
The source recovery accepts recovery requests from other peer shards and start the recovery process from this
source shard to the target shard.
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
Constructor Summary
ConstructorDescriptionPeerRecoverySourceService(TransportService transportService, IndicesService indicesService, RecoverySettings recoverySettings)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeIndexShardClosed(ShardId shardId, IndexShard indexShard, Settings indexSettings)
Called before the index shard gets closed.void
Called when cluster state changes.protected void
doClose()
protected void
doStart()
protected void
doStop()
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
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, beforeIndexShardCreated, beforeIndexShardDeleted, beforeIndexShardRecovery, indexShardStateChanged, onShardInactive, onStoreClosed, onStoreCreated, shardRoutingChanged
-
Constructor Details
-
PeerRecoverySourceService
@Inject public PeerRecoverySourceService(TransportService transportService, IndicesService indicesService, RecoverySettings recoverySettings)
-
-
Method Details
-
doStart
protected void doStart()- Specified by:
doStart
in classAbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClose
in classAbstractLifecycleComponent
-
beforeIndexShardClosed
public void beforeIndexShardClosed(ShardId shardId, @Nullable IndexShard indexShard, Settings indexSettings)Description copied from interface:IndexEventListener
Called before the index shard gets closed.- Specified by:
beforeIndexShardClosed
in interfaceIndexEventListener
indexShard
- The index shard
-
clusterChanged
Description copied from interface:ClusterStateListener
Called when cluster state changes.- Specified by:
clusterChanged
in interfaceClusterStateListener
-