public class FsChannelSnapshot extends Object implements Translog.Snapshot
Constructor and Description |
---|
FsChannelSnapshot(long id,
RafReference raf,
long length,
int totalOperations)
Create a snapshot of translog file channel.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
estimatedTotalOperations()
The total number of operations in the translog.
|
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()
Returns the next operation, or null when no more operations are found
|
long |
position()
Returns the current position in the translog stream
|
void |
seekTo(long position)
Seek to the specified position in the translog stream
|
long |
translogId()
The id of the translog the snapshot was taken with.
|
public FsChannelSnapshot(long id, RafReference raf, long length, int totalOperations) throws FileNotFoundException
FileNotFoundException
public long translogId()
Translog.Snapshot
translogId
in interface Translog.Snapshot
public long position()
Translog.Snapshot
position
in interface Translog.Snapshot
public long length()
Translog.Snapshot
length
in interface Translog.Snapshot
public int estimatedTotalOperations()
Translog.Snapshot
estimatedTotalOperations
in interface Translog.Snapshot
public long lengthInBytes()
Translog.Snapshot
lengthInBytes
in interface Translog.Snapshot
public Translog.Operation next()
Translog.Snapshot
next
in interface Translog.Snapshot
public void seekTo(long position)
Translog.Snapshot
seekTo
in interface Translog.Snapshot
public void close() throws ElasticsearchException
close
in interface AutoCloseable
close
in interface Releasable
ElasticsearchException
Copyright © 2009–2015. All rights reserved.