org.elasticsearch.index.translog
Interface Translog.Snapshot

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

public static interface Translog.Snapshot
extends Releasable

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


Method Summary
 int estimatedTotalOperations()
          The total number of operations in the translog.
 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)
           
 InputStream stream()
          Returns a stream of this snapshot.
 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.


estimatedTotalOperations

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


hasNext

boolean hasNext()

next

Translog.Operation next()

seekForward

void seekForward(long length)

stream

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

Throws:
IOException

lengthInBytes

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



Copyright © 2009-2012. All Rights Reserved.