@API(value=EXPERIMENTAL) public class FDBSyntheticRecord extends Object implements FDBIndexableRecord<Message>
FDBSyntheticRecord
is FDBIndexableRecord
, so that indexes can be defined on synthetic records,
but not FDBStoredRecord
, since it is not stored separately.Modifier | Constructor and Description |
---|---|
protected |
FDBSyntheticRecord(Tuple primaryKey,
SyntheticRecordType<?> recordType,
Message record,
FDBStoredSizes size,
Map<String,FDBStoredRecord<? extends Message>> constituents) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
FDBStoredRecord<? extends Message> |
getConstituent(String name) |
Map<String,FDBStoredRecord<? extends Message>> |
getConstituents() |
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 synthetic record.
|
Message |
getRecord()
Get the Protobuf message form of this record.
|
SyntheticRecordType<?> |
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 ). |
int |
hashCode() |
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.
|
static FDBSyntheticRecord |
of(SyntheticRecordType<?> recordType,
Map<String,FDBStoredRecord<? extends Message>> constituents) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addSizeLogInfo
protected FDBSyntheticRecord(@Nonnull Tuple primaryKey, @Nonnull SyntheticRecordType<?> recordType, @Nonnull Message record, @Nonnull FDBStoredSizes size, @Nonnull Map<String,FDBStoredRecord<? extends Message>> constituents)
@Nonnull public static FDBSyntheticRecord of(@Nonnull SyntheticRecordType<?> recordType, @Nonnull Map<String,FDBStoredRecord<? extends Message>> constituents)
@Nonnull public Tuple getPrimaryKey()
getPrimaryKey
in interface FDBRecord<Message>
@Nonnull public SyntheticRecordType<?> getRecordType()
FDBRecord
getRecordType
in interface FDBRecord<Message>
@Nonnull public Message getRecord()
FDBRecord
public int getKeyCount()
getKeyCount
in interface FDBStoredSizes
public int getKeySize()
getKeySize
in interface FDBStoredSizes
public int getValueSize()
getValueSize
in interface FDBStoredSizes
public boolean isSplit()
FDBStoredSizes
isSplit
in interface FDBStoredSizes
true
if splitpublic boolean hasVersion()
FDBRecord
FDBRecordVersion
has been set for this StoredRecord
.hasVersion
in interface FDBRecord<Message>
true
if this record has a version@Nullable public FDBRecordVersion getVersion()
FDBRecord
FDBRecordVersion
associated with this record (or null
).getVersion
in interface FDBRecord<Message>
public boolean isVersionedInline()
FDBStoredSizes
FDBRecordStore.SAVE_VERSION_WITH_RECORD_FORMAT_VERSION
.isVersionedInline
in interface FDBStoredSizes
true
if this record is stored with a version in-line@Nonnull public Map<String,FDBStoredRecord<? extends Message>> getConstituents()
@Nullable public FDBStoredRecord<? extends Message> getConstituent(@Nonnull String name)