@InterfaceAudience.Private public class ByteBufferIOEngine extends 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(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
|
public ByteBufferIOEngine(long capacity,
boolean direct)
throws IOException
capacity - direct - true if allocate direct bufferIOExceptionpublic boolean isPersistent()
isPersistent in interface IOEnginepublic int 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
readIOExceptionpublic 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
writtenIOExceptionpublic void sync()
Copyright © 2014 The Apache Software Foundation. All rights reserved.