org.elasticsearch.index.translog.fs
Class FsTranslogFile
java.lang.Object
org.elasticsearch.index.translog.fs.FsTranslogFile
public class FsTranslogFile
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FsTranslogFile
public FsTranslogFile(ShardId shardId,
long id,
RafReference raf)
throws java.io.IOException
- Throws:
java.io.IOException
id
public long id()
estimatedNumberOfOperations
public int estimatedNumberOfOperations()
translogSizeInBytes
public long translogSizeInBytes()
add
public Translog.Location add(byte[] data,
int from,
int size)
throws java.io.IOException
- Throws:
java.io.IOException
read
public byte[] read(Translog.Location location)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close(boolean delete)
snapshot
public FsChannelSnapshot snapshot()
throws TranslogException
- Returns a snapshot on this file, null if it failed to snapshot.
- Throws:
TranslogException
sync
public void sync()