org.elasticsearch.index.gateway
Class IndexShardGatewayService
java.lang.Object
org.elasticsearch.index.shard.AbstractIndexShardComponent
org.elasticsearch.index.gateway.IndexShardGatewayService
- All Implemented Interfaces:
- IndexShardComponent, CloseableIndexComponent
public class IndexShardGatewayService
- extends AbstractIndexShardComponent
- implements CloseableIndexComponent
Method Summary |
void |
close(boolean delete)
Closes the index component. |
void |
recover()
Recovers the state of the shard from the gateway. |
void |
routingStateChanged()
Should be called when the shard routing state has changed (note, after the state has been set on the shard). |
void |
snapshot()
Snapshots the given shard into the gateway. |
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,
ThreadPool threadPool,
IndexShard indexShard,
IndexShardGateway shardGateway,
Store store)
routingStateChanged
public void routingStateChanged()
- Should be called when the shard routing state has changed (note, after the state has been set on the shard).
recover
public void recover()
throws IndexShardGatewayRecoveryException,
IgnoreGatewayRecoveryException
- Recovers the state of the shard from the gateway.
- Throws:
IndexShardGatewayRecoveryException
IgnoreGatewayRecoveryException
snapshot
public void snapshot()
throws IndexShardGatewaySnapshotFailedException
- Snapshots the given shard into the gateway.
- Throws:
IndexShardGatewaySnapshotFailedException
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.