|
||||||||||
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.ByteBufferIOEngine
@InterfaceAudience.Private public class ByteBufferIOEngine
IO engine that stores data on the memory using an array of ByteBuffers
ByteBufferArray
Constructor Summary | |
---|---|
ByteBufferIOEngine(long capacity,
boolean direct)
Construct the ByteBufferIOEngine with the given capacity |
Method Summary | |
---|---|
boolean |
isPersistent()
Memory IO engine is always unable to support persistent storage for the cache |
int |
read(ByteBuffer dstBuffer,
long offset)
Transfers data from the buffer array to the given byte buffer |
void |
shutdown()
No operation for the shutdown in the memory IO engine |
void |
sync()
No operation for the sync in the memory IO engine |
String |
toString()
|
void |
write(ByteBuffer srcBuffer,
long offset)
Transfers data from the given byte buffer to the buffer array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ByteBufferIOEngine(long capacity, boolean direct) throws IOException
capacity
- direct
- true if allocate direct buffer
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 ByteBufferArray of 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 ByteBufferArray of the first byte to be
written
IOException
public void sync()
sync
in interface IOEngine
public void shutdown()
shutdown
in interface IOEngine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |