org.elasticsearch.index.translog.fs
Class SimpleFsTranslogFile
java.lang.Object
org.elasticsearch.index.translog.fs.SimpleFsTranslogFile
- All Implemented Interfaces:
- FsTranslogFile
public class SimpleFsTranslogFile
- extends Object
- implements FsTranslogFile
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleFsTranslogFile
public SimpleFsTranslogFile(ShardId shardId,
long id,
RafReference raf)
throws IOException
- Throws:
IOException
id
public long id()
- Specified by:
id
in interface FsTranslogFile
estimatedNumberOfOperations
public int estimatedNumberOfOperations()
- Specified by:
estimatedNumberOfOperations
in interface FsTranslogFile
translogSizeInBytes
public long translogSizeInBytes()
- Specified by:
translogSizeInBytes
in interface FsTranslogFile
add
public Translog.Location add(byte[] data,
int from,
int size)
throws IOException
- Specified by:
add
in interface FsTranslogFile
- Throws:
IOException
read
public byte[] read(Translog.Location location)
throws IOException
- Specified by:
read
in interface FsTranslogFile
- Throws:
IOException
close
public void close(boolean delete)
- Specified by:
close
in interface FsTranslogFile
snapshot
public FsChannelSnapshot snapshot()
throws TranslogException
- Returns a snapshot on this file, null if it failed to snapshot.
- Specified by:
snapshot
in interface FsTranslogFile
- Throws:
TranslogException
syncNeeded
public boolean syncNeeded()
- Specified by:
syncNeeded
in interface FsTranslogFile
sync
public void sync()
- Specified by:
sync
in interface FsTranslogFile
reuse
public void reuse(FsTranslogFile other)
- Specified by:
reuse
in interface FsTranslogFile
Copyright © 2009-2012. All Rights Reserved.