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
IOExceptionpublic long id()
id in interface FsTranslogFilepublic int estimatedNumberOfOperations()
estimatedNumberOfOperations in interface FsTranslogFilepublic long translogSizeInBytes()
translogSizeInBytes in interface FsTranslogFilepublic Translog.Location add(BytesReference data) throws IOException
add in interface FsTranslogFileIOExceptionpublic byte[] read(Translog.Location location) throws IOException
read in interface FsTranslogFileIOExceptionpublic void close(boolean delete)
close in interface FsTranslogFilepublic FsChannelSnapshot snapshot() throws TranslogException
snapshot in interface FsTranslogFileTranslogExceptionpublic boolean syncNeeded()
syncNeeded in interface FsTranslogFilepublic TranslogStream getStream()
getStream in interface FsTranslogFilepublic void sync()
throws IOException
sync in interface FsTranslogFileIOExceptionpublic void reuse(FsTranslogFile other)
reuse in interface FsTranslogFilepublic void updateBufferSize(int bufferSize)
throws TranslogException
updateBufferSize in interface FsTranslogFileTranslogExceptionpublic boolean closed()
closed in interface FsTranslogFileCopyright © 2009–2016. All rights reserved.