org.elasticsearch.index.translog.fs
Class BufferingFsTranslogFile

java.lang.Object
  extended by org.elasticsearch.index.translog.fs.BufferingFsTranslogFile
All Implemented Interfaces:
FsTranslogFile

public class BufferingFsTranslogFile
extends Object
implements FsTranslogFile


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.translog.fs.FsTranslogFile
FsTranslogFile.Type
 
Constructor Summary
BufferingFsTranslogFile(ShardId shardId, long id, RafReference raf, int bufferSize)
           
 
Method Summary
 Translog.Location add(byte[] data, int from, int size)
           
 void close(boolean delete)
           
 int estimatedNumberOfOperations()
           
 long id()
           
 byte[] read(Translog.Location location)
           
 void reuse(FsTranslogFile other)
           
 FsChannelSnapshot snapshot()
           
 void sync()
           
 boolean syncNeeded()
           
 long translogSizeInBytes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferingFsTranslogFile

public BufferingFsTranslogFile(ShardId shardId,
                               long id,
                               RafReference raf,
                               int bufferSize)
                        throws IOException
Throws:
IOException
Method Detail

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

snapshot

public FsChannelSnapshot snapshot()
                           throws TranslogException
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

close

public void close(boolean delete)
Specified by:
close in interface FsTranslogFile

reuse

public void reuse(FsTranslogFile other)
Specified by:
reuse in interface FsTranslogFile


Copyright © 2009-2012. All Rights Reserved.