Package oracle.kv

Class KVLocalConfig.Builder

    • Constructor Detail

      • Builder

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

      • setStoreName

        public KVLocalConfig.Builder setStoreName​(java.lang.String name)
        Sets store name.
        Parameters:
        name - the name of the store
        Returns:
        this instance
        Throws:
        java.lang.IllegalArgumentException - if store name is null or empty
      • setHostName

        public abstract KVLocalConfig.Builder setHostName​(java.lang.String name)
        Sets the host name.
        Parameters:
        name - the name of the host
        Returns:
        this instance
        Throws:
        java.lang.IllegalArgumentException - if host name is null or empty
        java.lang.UnsupportedOperationException - if this builder does not support setting the host name
      • 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:
        java.lang.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:
        java.lang.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
      • setPort

        public abstract KVLocalConfig.Builder setPort​(int portNum)
        Sets port number.
        Parameters:
        portNum - the port number for registry
        Returns:
        this instance
        Throws:
        java.lang.IllegalArgumentException - if the port number is not in the range 0 to 65535
        java.lang.UnsupportedOperationException - if this builder does not support setting the port number
      • 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:
        java.lang.UnsupportedOperationException - if this builder does not support enabling or disabling security