org.elasticsearch.index.gateway
Class IndexShardGatewayService
java.lang.Object
org.elasticsearch.index.shard.AbstractIndexShardComponent
org.elasticsearch.index.gateway.IndexShardGatewayService
- All Implemented Interfaces:
- CloseableIndexComponent, IndexShardComponent
public class IndexShardGatewayService
- extends AbstractIndexShardComponent
- implements CloseableIndexComponent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexShardGatewayService
@Inject
public IndexShardGatewayService(ShardId shardId,
@IndexSettings
Settings indexSettings,
IndexSettingsService indexSettingsService,
ThreadPool threadPool,
IndexShard indexShard,
IndexShardGateway shardGateway)
routingStateChanged
public void routingStateChanged()
- Should be called when the shard routing state has changed (note, after the state has been set on the shard).
recoveryStatus
public RecoveryStatus recoveryStatus()
snapshotStatus
public SnapshotStatus snapshotStatus()
recover
public void recover(boolean indexShouldExists,
IndexShardGatewayService.RecoveryListener listener)
throws IndexShardGatewayRecoveryException,
IgnoreGatewayRecoveryException
- Recovers the state of the shard from the gateway.
- Throws:
IndexShardGatewayRecoveryException
IgnoreGatewayRecoveryException
snapshot
public void snapshot(java.lang.String reason)
throws IndexShardGatewaySnapshotFailedException
- Snapshots the given shard into the gateway.
- Throws:
IndexShardGatewaySnapshotFailedException
snapshotOnClose
public void snapshotOnClose()
close
public void close(boolean delete)
- Description copied from interface:
CloseableIndexComponent
- Closes the index component. A boolean indicating if its part of an actual index
deletion or not is passed.
- Specified by:
close
in interface CloseableIndexComponent
- Parameters:
delete
- true if the index is being deleted.