org.apache.hadoop.hbase.io.hfile.bucket
Interface IOEngine

All Known Implementing Classes:
ByteBufferIOEngine, FileIOEngine

@InterfaceAudience.Private
public interface IOEngine

A class implementing IOEngine interface could support data services for BucketCache.


Method Summary
 boolean isPersistent()
           
 void read(ByteBuffer dstBuffer, long offset)
          Transfers data from IOEngine to the given byte buffer
 void shutdown()
          Shutdown the IOEngine
 void sync()
          Sync the data to IOEngine after writing
 void write(ByteBuffer srcBuffer, long offset)
          Transfers data from the given byte buffer to IOEngine
 

Method Detail

isPersistent

boolean isPersistent()
Returns:
true if persistent storage is supported for the cache when shutdown

read

void read(ByteBuffer dstBuffer,
          long offset)
          throws IOException
Transfers data from IOEngine to the given byte buffer

Parameters:
dstBuffer - the given byte buffer into which bytes are to be written
offset - The offset in the IO engine where the first byte to be read
Throws:
IOException

write

void write(ByteBuffer srcBuffer,
           long offset)
           throws IOException
Transfers data from the given byte buffer to IOEngine

Parameters:
srcBuffer - the given byte buffer from which bytes are to be read
offset - The offset in the IO engine where the first byte to be written
Throws:
IOException

sync

void sync()
          throws IOException
Sync the data to IOEngine after writing

Throws:
IOException

shutdown

void shutdown()
Shutdown the IOEngine



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.