Package org.apache.cassandra.io.util
Class MmappedRegions.Region
- java.lang.Object
-
- org.apache.cassandra.io.util.MmappedRegions.Region
-
- All Implemented Interfaces:
Rebufferer.BufferHolder
- Enclosing class:
- MmappedRegions
public static final class MmappedRegions.Region extends java.lang.Object implements Rebufferer.BufferHolder
-
-
Constructor Summary
Constructors Constructor Description Region(long offset, java.nio.ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferbuffer()Returns a useable buffer (i.e.longend()longoffset()Position in the file of the start of the buffer.voidrelease()To be called when this buffer is no longer in use.
-
-
-
Method Detail
-
buffer
public java.nio.ByteBuffer buffer()
Description copied from interface:Rebufferer.BufferHolderReturns a useable buffer (i.e. one whose position and limit can be freely modified). Its limit will be set to the size of the available data in the buffer. The buffer must be treated as read-only.- Specified by:
bufferin interfaceRebufferer.BufferHolder
-
offset
public long offset()
Description copied from interface:Rebufferer.BufferHolderPosition in the file of the start of the buffer.- Specified by:
offsetin interfaceRebufferer.BufferHolder
-
end
public long end()
-
release
public void release()
Description copied from interface:Rebufferer.BufferHolderTo be called when this buffer is no longer in use. Must be called for all BufferHolders, or ChunkCache will not be able to free blocks.- Specified by:
releasein interfaceRebufferer.BufferHolder
-
-