org.elasticsearch.index.translog
Interface Translog.Snapshot

All Superinterfaces:
Releasable
All Known Implementing Classes:
FsChannelSnapshot, FsStreamSnapshot
Enclosing interface:
Translog

@NotThreadSafe
public static interface Translog.Snapshot
extends Releasable

A snapshot of the transaction log, allows to iterate over all the transaction log operations.


Method Summary
 boolean hasNext()
           
 long length()
          Returns the internal length (*not* number of operations) of this snapshot.
 long lengthInBytes()
          The length in bytes of this stream.
 Translog.Operation next()
           
 long position()
           
 void seekForward(long length)
           
 int snapshotOperations()
          The number of operations in this snapshot.
 java.io.InputStream stream()
          Returns a stream of this snapshot.
 int totalOperations()
          The total number of operations in the translog.
 long translogId()
          The id of the translog the snapshot was taken with.
 
Methods inherited from interface org.elasticsearch.common.lease.Releasable
release
 

Method Detail

translogId

long translogId()
The id of the translog the snapshot was taken with.


position

long position()

length

long length()
Returns the internal length (*not* number of operations) of this snapshot.


totalOperations

int totalOperations()
The total number of operations in the translog.


snapshotOperations

int snapshotOperations()
The number of operations in this snapshot.


hasNext

boolean hasNext()

next

Translog.Operation next()

seekForward

void seekForward(long length)

stream

java.io.InputStream stream()
                           throws java.io.IOException
Returns a stream of this snapshot.

Throws:
java.io.IOException

lengthInBytes

long lengthInBytes()
The length in bytes of this stream.