public final class RecordFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static RecordMapper<Record> |
mapperRecord |
| Constructor and Description |
|---|
RecordFactory(int keyLength,
int valueLength) |
| Modifier and Type | Method and Description |
|---|---|
<X> X |
access(ByteBuffer bb,
int idx,
byte[] keyBytes,
RecordMapper<X> mapper) |
Record |
buildFrom(ByteBuffer bb,
int idx) |
Record |
create()
Create a record, allocating space for the key and value (if any)
|
Record |
create(byte[] key)
Create a key and value record (value uninitialized)
|
Record |
create(byte[] key,
byte[] value)
Create a key and value record
|
Record |
createKeyOnly()
Create a key-only record, allocating blank space for the key
|
Record |
createKeyOnly(Record record)
Create a key-only record
|
boolean |
hasValue() |
void |
insertInto(Record record,
ByteBuffer bb,
int idx) |
RecordFactory |
keyFactory()
Return a RecordFactory that makes key-only records of the same key size
|
int |
keyLength() |
int |
recordLength() |
String |
toString() |
int |
valueLength() |
public static final RecordMapper<Record> mapperRecord
public RecordFactory keyFactory()
public Record createKeyOnly()
public Record create(byte[] key)
public Record create()
public Record create(byte[] key, byte[] value)
public void insertInto(Record record, ByteBuffer bb, int idx)
public <X> X access(ByteBuffer bb, int idx, byte[] keyBytes, RecordMapper<X> mapper)
public Record buildFrom(ByteBuffer bb, int idx)
public boolean hasValue()
public int recordLength()
public int keyLength()
public int valueLength()
Licensed under the Apache License, Version 2.0