M
- type used to represent stored records@API(value=MAINTAINED) public class FDBStoredRecordBuilder<M extends Message> extends Object implements FDBRecord<M>, FDBStoredSizes
FDBStoredRecord
.Constructor and Description |
---|
FDBStoredRecordBuilder() |
FDBStoredRecordBuilder(M record) |
Modifier and Type | Method and Description |
---|---|
FDBStoredRecord<M> |
build() |
int |
getKeyCount()
Get the number of keys used to store this record.
|
int |
getKeySize()
Get the size in bytes of all keys used to store this record.
|
Tuple |
getPrimaryKey()
Get the primary key for this record.
|
M |
getRecord()
Get the Protobuf message form of this record.
|
RecordType |
getRecordType()
Get the record type for this record.
|
int |
getValueSize()
Get the size in bytes of all values used to store this record.
|
FDBRecordVersion |
getVersion()
Get the
FDBRecordVersion associated with this record (or null ). |
boolean |
hasVersion()
Get whether a
FDBRecordVersion has been set for this StoredRecord . |
boolean |
isSplit()
Get whether this record is split between two or more key-value pairs.
|
boolean |
isVersionedInline()
Get whether this record was stored with an associated version.
|
FDBStoredRecordBuilder<M> |
setKeyCount(int keyCount) |
FDBStoredRecordBuilder<M> |
setKeySize(int keySize) |
FDBStoredRecordBuilder<M> |
setPrimaryKey(Tuple primaryKey) |
FDBStoredRecordBuilder<M> |
setRecord(M record) |
FDBStoredRecordBuilder<M> |
setRecordType(RecordType recordType) |
FDBStoredRecordBuilder<M> |
setSize(FDBStoredSizes size) |
FDBStoredRecordBuilder<M> |
setSplit(boolean split) |
FDBStoredRecordBuilder<M> |
setValueSize(int valueSize) |
FDBStoredRecordBuilder<M> |
setVersion(FDBRecordVersion recordVersion) |
FDBStoredRecordBuilder<M> |
setVersionedInline(boolean versionedInline) |
@Nonnull public Tuple getPrimaryKey()
FDBRecord
getPrimaryKey
in interface FDBRecord<M extends Message>
@Nonnull public RecordType getRecordType()
FDBRecord
getRecordType
in interface FDBRecord<M extends Message>
@Nonnull public M getRecord()
FDBRecord
public boolean hasVersion()
FDBRecord
FDBRecordVersion
has been set for this StoredRecord
.hasVersion
in interface FDBRecord<M extends Message>
true
if this record has a version@Nullable public FDBRecordVersion getVersion()
FDBRecord
FDBRecordVersion
associated with this record (or null
).getVersion
in interface FDBRecord<M extends Message>
public int getKeyCount()
FDBStoredSizes
getKeyCount
in interface FDBStoredSizes
public int getKeySize()
FDBStoredSizes
getKeySize
in interface FDBStoredSizes
public int getValueSize()
FDBStoredSizes
getValueSize
in interface FDBStoredSizes
public boolean isSplit()
FDBStoredSizes
isSplit
in interface FDBStoredSizes
true
if splitpublic boolean isVersionedInline()
FDBStoredSizes
FDBRecordStore.SAVE_VERSION_WITH_RECORD_FORMAT_VERSION
.isVersionedInline
in interface FDBStoredSizes
true
if this record is stored with a version in-linepublic FDBStoredRecordBuilder<M> setPrimaryKey(Tuple primaryKey)
public FDBStoredRecordBuilder<M> setRecordType(RecordType recordType)
public FDBStoredRecordBuilder<M> setRecord(M record)
public FDBStoredRecordBuilder<M> setVersion(FDBRecordVersion recordVersion)
public FDBStoredRecordBuilder<M> setKeyCount(int keyCount)
public FDBStoredRecordBuilder<M> setKeySize(int keySize)
public FDBStoredRecordBuilder<M> setValueSize(int valueSize)
public FDBStoredRecordBuilder<M> setSplit(boolean split)
public FDBStoredRecordBuilder<M> setVersionedInline(boolean versionedInline)
public FDBStoredRecordBuilder<M> setSize(@Nonnull FDBStoredSizes size)
public FDBStoredRecord<M> build()