public class JoinPolicy extends Object
Modifier and Type | Field and Description |
---|---|
static JoinPolicy |
EVEN_BIAS
Balance the allocation of spaces evenly between left and right pages.
|
static JoinPolicy |
LEFT_BIAS
Maximize the number of records in the left page, and minimize the number
of records in the right page.
|
static JoinPolicy |
RIGHT_BIAS
Minimize the number of records in the left page, and maximize the number
of records in the right page.
|
Modifier | Constructor and Description |
---|---|
protected |
JoinPolicy(int bias,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptJoin(Buffer buffer,
int virtualSize)
Determines whether two pages will be permitted to be rejoined during a
delete operation.
|
static JoinPolicy |
forName(String name) |
String |
getName() |
int |
rebalanceFit(Buffer leftBuffer,
Buffer rightBuffer,
int kbOffset,
int foundAt1,
int foundAt2,
int virtualSize,
int leftSize,
int rightSize,
int capacity)
Determines the quality of fit for a specified candidate join location
within a page.
|
public static final JoinPolicy LEFT_BIAS
public static final JoinPolicy RIGHT_BIAS
public static final JoinPolicy EVEN_BIAS
protected JoinPolicy(int bias, String name)
public static JoinPolicy forName(String name)
public int rebalanceFit(Buffer leftBuffer, Buffer rightBuffer, int kbOffset, int foundAt1, int foundAt2, int virtualSize, int leftSize, int rightSize, int capacity)
leftBuffer
- The left Buffer>
rightBuffer
- The right Buffer
kbOffset
- The key block proposed as the new split pointfoundAt1
- First key being deleted from left pagefoundAt2
- First key not being deleted from right pagevirtualSize
- The total size of both pagesleftSize
- Size the left page would have if split hererightSize
- Size the right page would have if split herecapacity
- The total space available in a page (less overhead)public boolean acceptJoin(Buffer buffer, int virtualSize)
buffer
- virtualSize
- true
if the buffer will accept content of the
specified sizepublic String getName()
Copyright © 2025 Open Identity Platform Community. All rights reserved.