org.elasticsearch.index.gateway
Class IndexShardGateway.Snapshot

java.lang.Object
  extended by org.elasticsearch.index.gateway.IndexShardGateway.Snapshot
Enclosing interface:
IndexShardGateway

public static class IndexShardGateway.Snapshot
extends java.lang.Object


Constructor Summary
IndexShardGateway.Snapshot(SnapshotIndexCommit indexCommit, Translog.Snapshot translogSnapshot, long lastIndexVersion, long lastTranslogId, int lastTranslogSize)
           
 
Method Summary
 boolean indexChanged()
          Indicates that the index has changed from the latest snapshot.
 SnapshotIndexCommit indexCommit()
           
 long lastIndexVersion()
           
 long lastTranslogId()
           
 int lastTranslogSize()
           
 boolean newTranslogCreated()
          Indicates that a new transaction log has been created.
 boolean sameTranslogNewOperations()
          Indicates that the same translog exists, but new operations have been appended to it.
 Translog.Snapshot translogSnapshot()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexShardGateway.Snapshot

public IndexShardGateway.Snapshot(SnapshotIndexCommit indexCommit,
                                  Translog.Snapshot translogSnapshot,
                                  long lastIndexVersion,
                                  long lastTranslogId,
                                  int lastTranslogSize)
Method Detail

indexChanged

public boolean indexChanged()
Indicates that the index has changed from the latest snapshot.


newTranslogCreated

public boolean newTranslogCreated()
Indicates that a new transaction log has been created. Note check this before you check sameTranslogNewOperations().


sameTranslogNewOperations

public boolean sameTranslogNewOperations()
Indicates that the same translog exists, but new operations have been appended to it. Throws ElasticSearchIllegalStateException if newTranslogCreated() is true, so always check that first.


indexCommit

public SnapshotIndexCommit indexCommit()

translogSnapshot

public Translog.Snapshot translogSnapshot()

lastIndexVersion

public long lastIndexVersion()

lastTranslogId

public long lastTranslogId()

lastTranslogSize

public int lastTranslogSize()