org.elasticsearch.index.gateway
Interface IndexShardGateway

All Superinterfaces:
CloseableIndexComponent, IndexShardComponent
All Known Implementing Classes:
BlobStoreIndexShardGateway, FsIndexShardGateway, LocalIndexShardGateway, NoneIndexShardGateway

public interface IndexShardGateway
extends IndexShardComponent, CloseableIndexComponent


Nested Class Summary
static class IndexShardGateway.Snapshot
           
static interface IndexShardGateway.SnapshotLock
           
 
Field Summary
static IndexShardGateway.SnapshotLock NO_SNAPSHOT_LOCK
           
 
Method Summary
 SnapshotStatus currentSnapshotStatus()
          The current snapshot status being performed.
 SnapshotStatus lastSnapshotStatus()
          The last snapshot status performed.
 IndexShardGateway.SnapshotLock obtainSnapshotLock()
           
 void recover(boolean indexShouldExists, RecoveryStatus recoveryStatus)
          Recovers the state of the shard from the gateway.
 RecoveryStatus recoveryStatus()
          The last / on going recovery status.
 boolean requiresSnapshot()
          Returns true if snapshot is even required on this gateway (i.e.
 boolean requiresSnapshotScheduling()
          Returns true if this gateway requires scheduling management for snapshot operations.
 SnapshotStatus snapshot(IndexShardGateway.Snapshot snapshot)
          Snapshots the given shard into the gateway.
 String type()
           
 
Methods inherited from interface org.elasticsearch.index.shard.IndexShardComponent
indexSettings, shardId
 
Methods inherited from interface org.elasticsearch.index.CloseableIndexComponent
close
 

Field Detail

NO_SNAPSHOT_LOCK

static final IndexShardGateway.SnapshotLock NO_SNAPSHOT_LOCK
Method Detail

type

String type()

recoveryStatus

RecoveryStatus recoveryStatus()
The last / on going recovery status.


lastSnapshotStatus

SnapshotStatus lastSnapshotStatus()
The last snapshot status performed. Can be null.


currentSnapshotStatus

SnapshotStatus currentSnapshotStatus()
The current snapshot status being performed. Can be null indicating that no snapshot is being executed currently.


recover

void recover(boolean indexShouldExists,
             RecoveryStatus recoveryStatus)
             throws IndexShardGatewayRecoveryException
Recovers the state of the shard from the gateway.

Throws:
IndexShardGatewayRecoveryException

snapshot

SnapshotStatus snapshot(IndexShardGateway.Snapshot snapshot)
                        throws IndexShardGatewaySnapshotFailedException
Snapshots the given shard into the gateway.

Throws:
IndexShardGatewaySnapshotFailedException

requiresSnapshot

boolean requiresSnapshot()
Returns true if snapshot is even required on this gateway (i.e. mainly handles recovery).


requiresSnapshotScheduling

boolean requiresSnapshotScheduling()
Returns true if this gateway requires scheduling management for snapshot operations.


obtainSnapshotLock

IndexShardGateway.SnapshotLock obtainSnapshotLock()
                                                  throws Exception
Throws:
Exception


Copyright © 2009-2012. All Rights Reserved.