|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.bucket.FileIOEngine
@InterfaceAudience.Private public class FileIOEngine
IO engine that stores data to a file on the local file system.
Constructor Summary | |
---|---|
FileIOEngine(String filePath,
long fileSize)
|
Method Summary | |
---|---|
boolean |
isPersistent()
File IO engine is always able to support persistent storage for the cache |
int |
read(ByteBuffer dstBuffer,
long offset)
Transfers data from file to the given byte buffer |
void |
shutdown()
Close the file |
void |
sync()
Sync the data to file after writing |
String |
toString()
|
void |
write(ByteBuffer srcBuffer,
long offset)
Transfers data from the given byte buffer to file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileIOEngine(String filePath, long fileSize) throws IOException
IOException
Method Detail |
---|
public String toString()
toString
in class Object
public boolean isPersistent()
isPersistent
in interface IOEngine
public int read(ByteBuffer dstBuffer, long offset) throws IOException
read
in interface IOEngine
dstBuffer
- the given byte buffer into which bytes are to be writtenoffset
- The offset in the file where the first byte to be read
IOException
public void write(ByteBuffer srcBuffer, long offset) throws IOException
write
in interface IOEngine
srcBuffer
- the given byte buffer from which bytes are to be readoffset
- The offset in the file where the first byte to be written
IOException
public void sync() throws IOException
sync
in interface IOEngine
IOException
public void shutdown()
shutdown
in interface IOEngine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |