@InterfaceAudience.Private public class ByteBufferIOEngine extends java.lang.Object implements IOEngine
ByteBufferArray
Constructor and Description |
---|
ByteBufferIOEngine(long capacity,
boolean direct)
Construct the ByteBufferIOEngine with the given capacity
|
Modifier and Type | Method and Description |
---|---|
boolean |
isPersistent()
Memory IO engine is always unable to support persistent storage for the
cache
|
int |
read(java.nio.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
|
java.lang.String |
toString() |
void |
write(java.nio.ByteBuffer srcBuffer,
long offset)
Transfers data from the given byte buffer to the buffer array
|
public ByteBufferIOEngine(long capacity, boolean direct) throws java.io.IOException
capacity
- direct
- true if allocate direct bufferjava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isPersistent()
isPersistent
in interface IOEngine
public int read(java.nio.ByteBuffer dstBuffer, long offset) throws java.io.IOException
public void write(java.nio.ByteBuffer srcBuffer, long offset) throws java.io.IOException
public void sync()