public class DupKeyData extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DupKeyData.NextNoDupComparator
Used to perform the getNextNoDup operation.
|
static class |
DupKeyData.PutNoOverwriteComparator
Used to perform the putNoOverwrite operation.
|
static class |
DupKeyData.TwoPartKeyComparator
Comparator that compares the combined key/data two-part key, calling the
user-defined btree and duplicate comparator as needed.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
PREFIX_ONLY |
| Constructor and Description |
|---|
DupKeyData() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
combine(byte[] key,
byte[] data) |
static byte[] |
combine(byte[] key,
int keyOff,
int keySize,
byte[] data,
int dataOff,
int dataSize) |
static DatabaseEntry |
combine(DatabaseEntry paramKey,
DatabaseEntry paramData)
Returns twoPartKey as:
paramKey bytes,
paramData bytes,
reverse-packed len of paramKey bytes.
|
static int |
compareMainKey(byte[] keyBytes1,
byte[] keyBytes2,
Comparator<byte[]> btreeComparator)
Compares the first part of the two keys.
|
static int |
compareMainKey(byte[] keyBytes1,
byte[] keyBytes2,
int keyOff2,
int keySize2,
Comparator<byte[]> btreeComparator)
Compares the first part of the two keys.
|
static byte[] |
getData(byte[] buf,
int off,
int len) |
static byte[] |
getKey(byte[] buf,
int off,
int len) |
static int |
getKeyLength(byte[] buf,
int off,
int len) |
static byte[] |
makePrefixKey(byte[] key,
int keyOff,
int keySize)
Returns a two-part key entry with the given key portion, no data, and
the special PREFIX_ONLY value for the key length.
|
static DatabaseEntry |
removeData(byte[] twoPartKey)
Splits twoPartKey and returns a two-part key entry containing the key
portion from twoPartKey, no data, and the special PREFIX_ONLY value for
the key length.
|
static byte[] |
replaceData(byte[] twoPartKey,
byte[] newData)
Splits twoPartKey and returns a two-part key entry containing the key
portion of twoPartKey combined with newData.
|
static void |
split(byte[] twoPartKey,
int twoPartKeySize,
DatabaseEntry paramKey,
DatabaseEntry paramData)
Same as split method above, but with twoPartKey/twoPartKeySize byte
array and array size params.
|
static void |
split(DatabaseEntry twoPartKey,
DatabaseEntry paramKey,
DatabaseEntry paramData)
Splits twoPartKey, previously set by combine, into original paramKey and
paramData if they are non-null.
|
public static final int PREFIX_ONLY
public static DatabaseEntry combine(DatabaseEntry paramKey, DatabaseEntry paramData)
public static byte[] combine(byte[] key,
byte[] data)
public static byte[] combine(byte[] key,
int keyOff,
int keySize,
byte[] data,
int dataOff,
int dataSize)
public static void split(DatabaseEntry twoPartKey, DatabaseEntry paramKey, DatabaseEntry paramData)
public static void split(byte[] twoPartKey,
int twoPartKeySize,
DatabaseEntry paramKey,
DatabaseEntry paramData)
public static byte[] replaceData(byte[] twoPartKey,
byte[] newData)
public static DatabaseEntry removeData(byte[] twoPartKey)
public static byte[] makePrefixKey(byte[] key,
int keyOff,
int keySize)
public static int getKeyLength(byte[] buf,
int off,
int len)
public static byte[] getKey(byte[] buf,
int off,
int len)
public static byte[] getData(byte[] buf,
int off,
int len)
public static int compareMainKey(byte[] keyBytes1,
byte[] keyBytes2,
Comparator<byte[]> btreeComparator)
public static int compareMainKey(byte[] keyBytes1,
byte[] keyBytes2,
int keyOff2,
int keySize2,
Comparator<byte[]> btreeComparator)
Copyright © 2024. All rights reserved.