Class SplitHelper.SizeInfo
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.SplitHelper.SizeInfo
-
- All Implemented Interfaces:
FDBStoredSizes
- Enclosing class:
- SplitHelper
public static class SplitHelper.SizeInfo extends Object implements FDBStoredSizes
Accumulator for key-value sizes while loading / saving split records.
-
-
Constructor Summary
Constructors Constructor Description SizeInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(byte[] keyBytes, byte[] valueBytes)
void
add(KeyValue keyValue)
void
add(FDBStoredSizes sizes)
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.int
getValueSize()
Get the size in bytes of all values used to store this record.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.void
reset()
void
set(byte[] keyBytes, byte[] valueBytes)
void
set(KeyValue keyValue)
void
setKeyCount(int keyCount)
void
setKeySize(int keySize)
void
setSplit(boolean split)
void
setValueSize(int valueSize)
void
setVersionedInline(boolean versionedInline)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.provider.foundationdb.FDBStoredSizes
addSizeLogInfo
-
-
-
-
Method Detail
-
getKeyCount
public int getKeyCount()
Description copied from interface:FDBStoredSizes
Get the number of keys used to store this record.- Specified by:
getKeyCount
in interfaceFDBStoredSizes
- Returns:
- number of keys
-
setKeyCount
public void setKeyCount(int keyCount)
-
getKeySize
public int getKeySize()
Description copied from interface:FDBStoredSizes
Get the size in bytes of all keys used to store this record.- Specified by:
getKeySize
in interfaceFDBStoredSizes
- Returns:
- size in bytes
-
setKeySize
public void setKeySize(int keySize)
-
getValueSize
public int getValueSize()
Description copied from interface:FDBStoredSizes
Get the size in bytes of all values used to store this record.- Specified by:
getValueSize
in interfaceFDBStoredSizes
- Returns:
- size in bytes
-
setValueSize
public void setValueSize(int valueSize)
-
isSplit
public boolean isSplit()
Description copied from interface:FDBStoredSizes
Get whether this record is split between two or more key-value pairs.- Specified by:
isSplit
in interfaceFDBStoredSizes
- Returns:
true
if split
-
setSplit
public void setSplit(boolean split)
-
isVersionedInline
public boolean isVersionedInline()
Description copied from interface:FDBStoredSizes
Get whether this record was stored with an associated version. In particular, this states whether there was a version stored directly with the record in the database, which should only be true if the format version of the database is greater than or equal toFDBRecordStore.SAVE_VERSION_WITH_RECORD_FORMAT_VERSION
.- Specified by:
isVersionedInline
in interfaceFDBStoredSizes
- Returns:
true
if this record is stored with a version in-line
-
setVersionedInline
public void setVersionedInline(boolean versionedInline)
-
add
public void add(@Nonnull FDBStoredSizes sizes)
-
reset
public void reset()
-
-