Package oracle.kv
Class KVLocalConfig
- java.lang.Object
 - 
- oracle.kv.KVLocalConfig
 
 
- 
public class KVLocalConfig extends java.lang.ObjectRepresents the configuration parameters used to create aKVLocalobject.To build a
KVLocalConfigobject, the root directory parameter is required. All other parameters are optional.Use the
KVLocalConfig.InetBuilderclass to construct aKVLocalConfigobject using TCP sockets. For example:// Create a configuration with root directory specified as "rootDir". // Other parameters are set implicitly to default values. // storeName: kvstore // hostName: localhost // port: 5000 // isSecure: true // storageGB: 10 // memoryMB: 8192 KVLocalConfig config = new KVLocalConfig.InetBuilder("rootDir")) .build(); // Create a configuration with root directory specified as "rootDir". // Set port number to 6000 and memoryMB to 100 MB. // Other parameters are set implicitly to default values. // storeName: kvstore // hostName: localhost // isSecure: true // storageGB: 10 KVLocalConfig config = new KVLocalConfig.InetBuilder("rootDir")) .setPort(6000) .setMemoryMB(100) .build();Use theKVLocalConfig.UnixDomainBuilderclass to construct aKVLocalConfigobject using Unix domain sockets. Note that the resulting configuration can only be used when running Java 16 or latest releases since Unix domain sockets require at least Java 16.- Since:
 - 22.1
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKVLocalConfig.BuilderBase builder class used to set configuration parameters common to both TCP sockets and Unix domain sockets.static classKVLocalConfig.InetBuilderInetBuilder to help construct a KVLocalConfig instance using TCP sockets.static classKVLocalConfig.UnixDomainBuilderBuilder class to help construct aKVLocalConfiginstance using Unix domain sockets. 
- 
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MEMORY_SIZE_MBThe default memory size in megabytes is 8192, or 8 GB.static intDEFAULT_PORTThe default port number is 5000.static intDEFAULT_STORAGE_SIZE_GBThe default storage size in gigabyte is 10.static java.lang.StringDEFAULT_STORENAMEThe default store name is "kvstore". 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHostName()Returns the host name.intgetMemoryMB()Returns the memory size in MB.intgetPort()Returns the port number.java.lang.StringgetRootDirectory()Returns the directory where NoSQL Database data is placed.intgetStorageGB()Returns the storage directory size in GB.java.lang.StringgetStoreName()Returns the store name.booleanisSecure()Returns whether security is enabled.booleanisUnixDomain()Returns whether the configuration uses Unix domain sockets.java.lang.StringtoString() 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_STORENAME
public static final java.lang.String DEFAULT_STORENAME
The default store name is "kvstore".- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_STORAGE_SIZE_GB
public static final int DEFAULT_STORAGE_SIZE_GB
The default storage size in gigabyte is 10.- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_MEMORY_SIZE_MB
public static final int DEFAULT_MEMORY_SIZE_MB
The default memory size in megabytes is 8192, or 8 GB.- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_PORT
public static final int DEFAULT_PORT
The default port number is 5000.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
getRootDirectory
public java.lang.String getRootDirectory()
Returns the directory where NoSQL Database data is placed.- Returns:
 - the directory where NoSQL Database data is placed
 
 
- 
getStoreName
public java.lang.String getStoreName()
Returns the store name.- Returns:
 - the store name
 
 
- 
getHostName
public java.lang.String getHostName()
Returns the host name.- Returns:
 - the host name
 
 
- 
getPort
public int getPort()
Returns the port number.- Returns:
 - the port number
 
 
- 
isSecure
public boolean isSecure()
Returns whether security is enabled.- Returns:
 - whether security is enabled
 
 
- 
getMemoryMB
public int getMemoryMB()
Returns the memory size in MB.- Returns:
 - the memory size in MB
 
 
- 
getStorageGB
public int getStorageGB()
Returns the storage directory size in GB.- Returns:
 - the storage directory size in GB
 
 
- 
isUnixDomain
public boolean isUnixDomain()
Returns whether the configuration uses Unix domain sockets.- Returns:
 - whether the configuration uses Unix domain sockets
 
 
 - 
 
 -