public interface Chunk
ByteBuffer.
For example: a Chunk of 1G size may be backed by one MappedByteBuffer from a
memory-mapped 1G file, or multiple HeapByteBuffer/DirectByteBuffer.
| 限定符和类型 | 方法和说明 |
|---|---|
int |
allocate(int len)
Try to allocate size bytes from the chunk.
|
void |
free(int interChunkOffset)
release the space addressed by interChunkOffset.
|
int |
getChunkCapacity() |
int |
getChunkId() |
org.apache.flink.core.memory.MemorySegment |
getMemorySegment(int chunkOffset) |
int |
getOffsetInSegment(int offsetInChunk) |
int allocate(int len)
len - size of bytes to allocate.void free(int interChunkOffset)
interChunkOffset - offset of the chunkint getChunkId()
int getChunkCapacity()
org.apache.flink.core.memory.MemorySegment getMemorySegment(int chunkOffset)
int getOffsetInSegment(int offsetInChunk)
offsetInChunk - virtual and global address in chunkMemorySegments, return the offset in certain
one.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.