Package oracle.kv

Class KVLocalConfig.Builder

    • Constructor Detail

      • Builder

        public Builder​(String rootDir)
        Makes a builder for KVLocalConfig with the specified root directory.
        Parameters:
        rootDir - the root directory where NoSQL Database data is placed
        Throws:
        IllegalArgumentException - if specified rootDir is null or empty
    • Method Detail

      • setMemoryMB

        public KVLocalConfig.Builder setMemoryMB​(int mb)
        Sets the memory size in megabytes. Specifies the size of the Java heap used to run the embedded store.
        Parameters:
        mb - the memory size in megabytes
        Returns:
        this instance
        Throws:
        IllegalArgumentException - if the memory size is less than 1
      • setStorageGB

        public KVLocalConfig.Builder setStorageGB​(int gb)
        Sets the storage directory size in gigabytes.

        The storage directory size is the disk space limit for the Storage Node. If a Storage Node exceeds its disk usage threshold value (storage directory size - 5 GB), then the store suspends all write activities on that node, until sufficient data is removed to satisfy the threshold requirement. If the storage directory size is set to 0, the store opportunistically uses all available space, less 5 GB free disk space.

        Parameters:
        gb - the storage directory size in gigabytes
        Returns:
        this instance
        Throws:
        IllegalArgumentException - if the storage directory size is negative
      • build

        public abstract KVLocalConfig build()
        Builds a KVLocalConfig instance using the values specified in this builder.
        Returns:
        a KVLocalConfig instance for this builder
      • isSecure

        public abstract KVLocalConfig.Builder isSecure​(boolean secure)
        Specifies whether the store is secure.
        Parameters:
        secure - whether the store is secure
        Returns:
        this instance
        Throws:
        UnsupportedOperationException - if this builder does not support enabling or disabling security