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 Object


Constructor Summary
IndexShardGateway.Snapshot(SnapshotIndexCommit indexCommit, Translog.Snapshot translogSnapshot, long lastIndexVersion, long lastTranslogId, long lastTranslogLength, int lastTotalTranslogOperations)
           
 
Method Summary
 boolean indexChanged()
          Indicates that the index has changed from the latest snapshot.
 SnapshotIndexCommit indexCommit()
           
 long lastIndexVersion()
           
 int lastTotalTranslogOperations()
           
 long lastTranslogId()
           
 long lastTranslogLength()
           
 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,
                                  long lastTranslogLength,
                                  int lastTotalTranslogOperations)
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()

lastTranslogLength

public long lastTranslogLength()

lastTotalTranslogOperations

public int lastTotalTranslogOperations()


Copyright © 2009-2012. All Rights Reserved.