public class SimpleFsTranslogFile extends Object implements FsTranslogFile
FsTranslogFile.Type
Constructor and Description |
---|
SimpleFsTranslogFile(ShardId shardId,
long id,
RafReference raf) |
Modifier and Type | Method and Description |
---|---|
Translog.Location |
add(BytesReference data) |
void |
close(boolean delete) |
boolean |
closed() |
int |
estimatedNumberOfOperations() |
TranslogStream |
getStream() |
long |
id() |
byte[] |
read(Translog.Location location) |
void |
reuse(FsTranslogFile other) |
FsChannelSnapshot |
snapshot()
Returns a snapshot on this file, null if it failed to snapshot.
|
void |
sync() |
boolean |
syncNeeded() |
String |
toString() |
long |
translogSizeInBytes() |
void |
updateBufferSize(int bufferSize) |
public SimpleFsTranslogFile(ShardId shardId, long id, RafReference raf) throws IOException
IOException
public long id()
id
in interface FsTranslogFile
public int estimatedNumberOfOperations()
estimatedNumberOfOperations
in interface FsTranslogFile
public long translogSizeInBytes()
translogSizeInBytes
in interface FsTranslogFile
public Translog.Location add(BytesReference data) throws IOException
add
in interface FsTranslogFile
IOException
public byte[] read(Translog.Location location) throws IOException
read
in interface FsTranslogFile
IOException
public void close(boolean delete)
close
in interface FsTranslogFile
public FsChannelSnapshot snapshot() throws TranslogException
snapshot
in interface FsTranslogFile
TranslogException
public boolean syncNeeded()
syncNeeded
in interface FsTranslogFile
public TranslogStream getStream()
getStream
in interface FsTranslogFile
public void sync() throws IOException
sync
in interface FsTranslogFile
IOException
public void reuse(FsTranslogFile other)
reuse
in interface FsTranslogFile
public void updateBufferSize(int bufferSize) throws TranslogException
updateBufferSize
in interface FsTranslogFile
TranslogException
public boolean closed()
closed
in interface FsTranslogFile
Copyright © 2009–2015. All rights reserved.