public class Buffer extends Object
Memory structure that holds and manipulates the state of a fixed-length page
of a Volume
. Persistit manipulates the content of a page by copying
it into a Buffer
, reading and/or modifying modifying the
Buffer
, and then writing the Buffer
's content back
into the page. There are several types of pages within the BTree structure -
e.g., index pages and data pages. A Buffer
can hold and
manipulate any kind of page.
Multiple Buffer
s are managed by a BufferPool
that
provides methods to locate, load and store the contents of the
Buffer
.
Buffer
provides the low-level methods that organize keys and
values into byte arrays to be stored in database files.
Modifier and Type | Field and Description |
---|---|
protected Persistit |
_persistit |
static long |
DEFAULT_MAX_WAIT_TIME
Default maximum time to wait for access to this resource.
|
static int |
HEADER_SIZE
Size of standard header portion of each page type
|
static int |
MAX_BUFFER_SIZE
Architectural upper bound on buffer size
|
static int |
MAX_KEY_RATIO |
static int |
MIN_BUFFER_SIZE
Architectural lower bound on buffer size
|
static int |
PAGE_TYPE_DATA
Page type code for a data page.
|
static int |
PAGE_TYPE_GARBAGE
Page type code for a page that has been converted to hold a list of
garbage chains.
|
static int |
PAGE_TYPE_HEAD |
static int |
PAGE_TYPE_INDEX_MAX
Maximum page type code for an index page.
|
static int |
PAGE_TYPE_INDEX_MIN
Minimum page type code for an index page.
|
static int |
PAGE_TYPE_LONG_RECORD
Page type code for pages used to store continuation bytes for long
records
|
static int |
PAGE_TYPE_MAX
Largest value page type code.
|
static int |
PAGE_TYPE_UNALLOCATED
Page type code for an unallocated page.
|
static String[] |
TYPE_NAMES |
public static final int MIN_BUFFER_SIZE
public static final int MAX_BUFFER_SIZE
public static final int PAGE_TYPE_UNALLOCATED
public static final int PAGE_TYPE_DATA
public static final int PAGE_TYPE_INDEX_MIN
public static final int PAGE_TYPE_INDEX_MAX
public static final int PAGE_TYPE_GARBAGE
public static final int PAGE_TYPE_LONG_RECORD
public static final int PAGE_TYPE_MAX
public static final int PAGE_TYPE_HEAD
public static final String[] TYPE_NAMES
public static final int HEADER_SIZE
public static final int MAX_KEY_RATIO
public static final long DEFAULT_MAX_WAIT_TIME
protected final Persistit _persistit
public Volume getVolume()
Volume
to which the page currently occupying this
Buffer
belongspublic ByteBuffer getByteBuffer()
public long getPageAddress()
public int getBufferSize()
public long getTimestamp()
public int getAvailableSize()
public int getKeyCount()
public int getAlloc()
public int getPageType()
public String getPageTypeName()
public static String getPageTypeName(long page, int type)
public int getIndex()
public long getRightSibling()
public void setPageAddressAndVolume(long pageAddress, Volume volume)
public boolean isUnallocatedPage()
public boolean isDataPage()
public boolean isIndexPage()
public boolean isGarbagePage()
public boolean isHeadPage()
Volume
public boolean isLongRecordPage()
public String summarize()
Buffer
.public String toString()
public String toStringDetail()
public Management.RecordInfo[] getRecords()
Record
s extracted from this buffer.public boolean isAvailable(boolean writer)
public boolean isValid()
public boolean isTemporary()
public long getGeneration()
public String getStatusCode()
public String getStatusDisplayString()
public static String getStatusCode(int state)
public Thread getWriterThread()
Copyright © 2025 Open Identity Platform Community. All rights reserved.