Package oracle.kv
Class KVLocalConfig.Builder
java.lang.Object
oracle.kv.KVLocalConfig.Builder
- Direct Known Subclasses:
KVLocalConfig.InetBuilder
,KVLocalConfig.UnixDomainBuilder
- Enclosing class:
- KVLocalConfig
Base builder class used to set configuration parameters common to both
TCP sockets and Unix domain sockets.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract KVLocalConfig
build()
Builds aKVLocalConfig
instance using the values specified in this builder.abstract KVLocalConfig.Builder
isSecure
(boolean secure) Specifies whether the store is secure.abstract KVLocalConfig.Builder
setHostName
(String name) Sets the host name.setMemoryMB
(int mb) Sets the memory size in megabytes.abstract KVLocalConfig.Builder
setPort
(int portNum) Sets port number.setStorageGB
(int gb) Sets the storage directory size in gigabytes.setStoreName
(String name) Sets store name.
-
Constructor Details
-
Builder
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 Details
-
setStoreName
Sets store name.- Parameters:
name
- the name of the store- Returns:
- this instance
- Throws:
IllegalArgumentException
- if store name is null or empty
-
setHostName
Sets the host name.- Parameters:
name
- the name of the host- Returns:
- this instance
- Throws:
IllegalArgumentException
- if host name is null or emptyUnsupportedOperationException
- if this builder does not support setting the host name
-
setMemoryMB
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
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
Builds aKVLocalConfig
instance using the values specified in this builder.- Returns:
- a
KVLocalConfig
instance for this builder
-
setPort
Sets port number.- Parameters:
portNum
- the port number for registry- Returns:
- this instance
- Throws:
IllegalArgumentException
- if the port number is not in the range 0 to 65535UnsupportedOperationException
- if this builder does not support setting the port number
-
isSecure
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
-