@InterfaceAudience.Private public interface IOEngine
BucketCache
.Modifier and Type | Method and Description |
---|---|
boolean |
isPersistent()
Returns true if persistent storage is supported for the cache when shutdown
|
Cacheable |
read(BucketEntry be)
Transfers data from IOEngine to a Cacheable object.
|
void |
shutdown()
Shutdown the IOEngine
|
void |
sync()
Sync the data to IOEngine after writing n
|
default boolean |
usesSharedMemory()
IOEngine uses shared memory means, when reading Cacheable from it, those refers to the same
memory area as used by the Engine for caching it.
|
void |
write(ByteBuffer srcBuffer,
long offset)
Transfers data from the given byte buffer to IOEngine
|
void |
write(ByteBuff srcBuffer,
long offset)
Transfers the data from the given MultiByteBuffer to IOEngine
|
boolean isPersistent()
default boolean usesSharedMemory()
Cacheable read(BucketEntry be) throws IOException
be
- maintains an (offset,len,refCnt) inside.IOException
- when any IO error happenIllegalArgumentException
- when the length of the ByteBuff read is less than 'len'void write(ByteBuffer srcBuffer, long offset) throws IOException
srcBuffer
- the given byte buffer from which bytes are to be readoffset
- The offset in the IO engine where the first byte to be written nIOException
void write(ByteBuff srcBuffer, long offset) throws IOException
srcBuffer
- the given MultiBytebufffers from which bytes are to be readoffset
- the offset in the IO engine where the first byte to be written nIOException
void sync() throws IOException
IOException
void shutdown()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.