|
||||||||||
| 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 |
void |
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 |
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, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteBufferIOEngine(long capacity,
boolean direct)
throws IOException
capacity - direct - true if allocate direct buffer
IOException| Method Detail |
|---|
public boolean isPersistent()
isPersistent in interface IOEngine
public void read(ByteBuffer dstBuffer,
long offset)
throws IOException
read in interface IOEnginedstBuffer - 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 IOEnginesrcBuffer - the given byte buffer from which bytes are to be readoffset - The offset in the ByteBufferArray of the first byte to be
written
IOExceptionpublic void sync()
sync in interface IOEnginepublic void shutdown()
shutdown in interface IOEngine
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||