@InterfaceAudience.Private public interface IOEngine
BucketCache
.Modifier and Type | Method and Description |
---|---|
boolean |
isPersistent() |
Cacheable |
read(long offset,
int length,
CacheableDeserializer<Cacheable> deserializer)
Transfers data from IOEngine to a Cacheable object.
|
void |
shutdown()
Shutdown the IOEngine
|
void |
sync()
Sync the data to IOEngine after writing
|
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(long offset, int length, CacheableDeserializer<Cacheable> deserializer) throws IOException
length
- How many bytes to be read from the offsetoffset
- The offset in the IO engine where the first byte to be readdeserializer
- The deserializer to be used to make a Cacheable from the data.IOException
RuntimeException
- 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
writtenIOException
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 writtenIOException
void sync() throws IOException
IOException
void shutdown()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.