Class 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 Detail

      • SizeInfo

        public SizeInfo()
    • 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 interface FDBStoredSizes
        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 interface FDBStoredSizes
        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 interface FDBStoredSizes
        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 interface FDBStoredSizes
        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 to FDBRecordStore.SAVE_VERSION_WITH_RECORD_FORMAT_VERSION.
        Specified by:
        isVersionedInline in interface FDBStoredSizes
        Returns:
        true if this record is stored with a version in-line
      • setVersionedInline

        public void setVersionedInline​(boolean versionedInline)
      • set

        public void set​(@Nonnull
                        byte[] keyBytes,
                        @Nonnull
                        byte[] valueBytes)
      • add

        public void add​(@Nonnull
                        byte[] keyBytes,
                        @Nonnull
                        byte[] valueBytes)
      • reset

        public void reset()