@InterfaceAudience.Private public class ByteBufferIOEngine extends Object implements IOEngine
ByteBufferArray| 构造器和说明 |
|---|
ByteBufferIOEngine(long capacity,
boolean direct)
Construct the ByteBufferIOEngine with the given capacity
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 IOEnginepublic int read(ByteBuffer dstBuffer, long offset) throws IOException
read 在接口中 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 在接口中 IOEnginesrcBuffer - the given byte buffer from which bytes are to be readoffset - The offset in the ByteBufferArray of the first byte to be
writtenIOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.