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
FileNotFoundExceptionpublic long translogId()
Translog.SnapshottranslogId in interface Translog.Snapshotpublic long position()
Translog.Snapshotposition in interface Translog.Snapshotpublic long length()
Translog.Snapshotlength in interface Translog.Snapshotpublic int estimatedTotalOperations()
Translog.SnapshotestimatedTotalOperations in interface Translog.Snapshotpublic long lengthInBytes()
Translog.SnapshotlengthInBytes in interface Translog.Snapshotpublic Translog.Operation next()
Translog.Snapshotnext in interface Translog.Snapshotpublic void seekTo(long position)
Translog.SnapshotseekTo in interface Translog.Snapshotpublic void close()
throws ElasticsearchException
close in interface AutoCloseableclose in interface ReleasableElasticsearchExceptionCopyright © 2009–2016. All rights reserved.