Package org.rocksdb

Interface MutableColumnFamilyOptionsInterface<T extends MutableColumnFamilyOptionsInterface<T>>

    • Method Detail

      • setWriteBufferSize

        MutableColumnFamilyOptionsInterface setWriteBufferSize​(long writeBufferSize)
        Amount of data to build up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk file. Larger values increase performance, especially during bulk loads. Up to max_write_buffer_number write buffers may be held in memory at the same time, so you may wish to adjust this parameter to control memory usage. Also, a larger write buffer will result in a longer recovery time the next time the database is opened. Default: 64MB
        Parameters:
        writeBufferSize - the size of write buffer.
        Returns:
        the instance of the current object.
        Throws:
        java.lang.IllegalArgumentException - thrown on 32-Bit platforms while overflowing the underlying platform specific value.
      • writeBufferSize

        long writeBufferSize()
        Return size of write buffer size.
        Returns:
        size of write buffer.
        See Also:
        setWriteBufferSize(long)
      • setDisableAutoCompactions

        MutableColumnFamilyOptionsInterface setDisableAutoCompactions​(boolean disableAutoCompactions)
        Disable automatic compactions. Manual compactions can still be issued on this column family
        Parameters:
        disableAutoCompactions - true if auto-compactions are disabled.
        Returns:
        the reference to the current option.
      • disableAutoCompactions

        boolean disableAutoCompactions()
        Disable automatic compactions. Manual compactions can still be issued on this column family
        Returns:
        true if auto-compactions are disabled.
      • setLevel0FileNumCompactionTrigger

        MutableColumnFamilyOptionsInterface setLevel0FileNumCompactionTrigger​(int level0FileNumCompactionTrigger)
        Number of files to trigger level-0 compaction. A value < 0 means that level-0 compaction will not be triggered by number of files at all. Default: 4
        Parameters:
        level0FileNumCompactionTrigger - The number of files to trigger level-0 compaction
        Returns:
        the reference to the current option.
      • level0FileNumCompactionTrigger

        int level0FileNumCompactionTrigger()
        Number of files to trigger level-0 compaction. A value < 0 means that level-0 compaction will not be triggered by number of files at all. Default: 4
        Returns:
        The number of files to trigger
      • setMaxCompactionBytes

        MutableColumnFamilyOptionsInterface setMaxCompactionBytes​(long maxCompactionBytes)
        We try to limit number of bytes in one compaction to be lower than this threshold. But it's not guaranteed. Value 0 will be sanitized.
        Parameters:
        maxCompactionBytes - max bytes in a compaction
        Returns:
        the reference to the current option.
        See Also:
        maxCompactionBytes()
      • maxCompactionBytes

        long maxCompactionBytes()
        We try to limit number of bytes in one compaction to be lower than this threshold. But it's not guaranteed. Value 0 will be sanitized.
        Returns:
        the maximum number of bytes in for a compaction.
        See Also:
        setMaxCompactionBytes(long)
      • setMaxBytesForLevelBase

        T setMaxBytesForLevelBase​(long maxBytesForLevelBase)
        The upper-bound of the total size of level-1 files in bytes. Maximum number of bytes for level L can be calculated as (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1)) For example, if maxBytesForLevelBase is 20MB, and if max_bytes_for_level_multiplier is 10, total data size for level-1 will be 200MB, total file size for level-2 will be 2GB, and total file size for level-3 will be 20GB. by default 'maxBytesForLevelBase' is 256MB.
        Parameters:
        maxBytesForLevelBase - maximum bytes for level base.
        Returns:
        the reference to the current option. See AdvancedMutableColumnFamilyOptionsInterface.setMaxBytesForLevelMultiplier(double)
      • maxBytesForLevelBase

        long maxBytesForLevelBase()
        The upper-bound of the total size of level-1 files in bytes. Maximum number of bytes for level L can be calculated as (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1)) For example, if maxBytesForLevelBase is 20MB, and if max_bytes_for_level_multiplier is 10, total data size for level-1 will be 200MB, total file size for level-2 will be 2GB, and total file size for level-3 will be 20GB. by default 'maxBytesForLevelBase' is 256MB.
        Returns:
        the upper-bound of the total size of level-1 files in bytes. See AdvancedMutableColumnFamilyOptionsInterface.maxBytesForLevelMultiplier()
      • setCompressionType

        T setCompressionType​(CompressionType compressionType)
        Compress blocks using the specified compression algorithm. This parameter can be changed dynamically. Default: SNAPPY_COMPRESSION, which gives lightweight but fast compression.
        Parameters:
        compressionType - Compression Type.
        Returns:
        the reference to the current option.
      • compressionType

        CompressionType compressionType()
        Compress blocks using the specified compression algorithm. This parameter can be changed dynamically. Default: SNAPPY_COMPRESSION, which gives lightweight but fast compression.
        Returns:
        Compression type.