public class PersistentMemoryConfig extends Object
Constructor and Description |
---|
PersistentMemoryConfig() |
PersistentMemoryConfig(PersistentMemoryConfig persistentMemoryConfig)
Constructs an instance with copying the fields of the provided
PersistentMemoryConfig . |
Modifier and Type | Method and Description |
---|---|
PersistentMemoryConfig |
addDirectoryConfig(PersistentMemoryDirectoryConfig directoryConfig)
Adds the persistent memory directory configuration to be used to
store memory structures allocated by native memory manager.
|
boolean |
equals(Object o) |
List<PersistentMemoryDirectoryConfig> |
getDirectoryConfigs()
Returns the persistent memory directory configurations to be used
to store memory structures allocated by native memory manager.
|
PersistentMemoryMode |
getMode()
Returns the mode in which the persistent memory should be used.
|
int |
hashCode() |
boolean |
isEnabled()
Returns if the persistent memory is enabled.
|
PersistentMemoryConfig |
setDirectoryConfigs(List<PersistentMemoryDirectoryConfig> directoryConfigs)
Sets the persistent memory directory configuration to the set of
directories provided in the
directoryConfigs argument. |
PersistentMemoryConfig |
setEnabled(boolean enabled)
Enables or disables persistent memory.
|
PersistentMemoryConfig |
setMode(PersistentMemoryMode mode)
Sets the mode in which the persistent memory should be used.
|
String |
toString() |
public PersistentMemoryConfig()
public PersistentMemoryConfig(@Nonnull PersistentMemoryConfig persistentMemoryConfig)
PersistentMemoryConfig
.persistentMemoryConfig
- The configuration to copyNullPointerException
- if persistentMemoryConfig
is null
public boolean isEnabled()
true
if persistent memory allocation is enabled, false
otherwise.public PersistentMemoryConfig setEnabled(boolean enabled)
NativeMemoryConfig
instance@Nonnull public List<PersistentMemoryDirectoryConfig> getDirectoryConfigs()
By default there are no configuration is set indicating that volatile RAM is being used.
public PersistentMemoryConfig setDirectoryConfigs(@Nonnull List<PersistentMemoryDirectoryConfig> directoryConfigs)
directoryConfigs
argument.
If the specified directories are not unique either in the directories
themselves or in the NUMA nodes specified for them,
InvalidConfigurationException
is thrown. Setting the NUMA
node on the subset of the configured directories while leaving
not set on others also results in InvalidConfigurationException
.directoryConfigs
- The persistent memory directories to setPersistentMemoryConfig
instanceInvalidConfigurationException
- If the configured directories
violate consistency or
uniqueness checks.NullPointerException
- if directoryConfigs
is null
public PersistentMemoryConfig addDirectoryConfig(@Nonnull PersistentMemoryDirectoryConfig directoryConfig)
InvalidConfigurationException
is thrown. Setting the NUMA
node on the subset of the configured directories while leaving
not set on others also results in InvalidConfigurationException
.directoryConfig
- the persistent memory directory configurationPersistentMemoryConfig
instanceInvalidConfigurationException
- If the configured directories
violate consistency or
uniqueness checks.NullPointerException
- if directoryConfigs
is null
@Nonnull public PersistentMemoryMode getMode()
public PersistentMemoryConfig setMode(@Nonnull PersistentMemoryMode mode)
PersistentMemoryMode.MOUNTED
.mode
- The mode of the persistent memoryNullPointerException
- if mode
is null
Copyright © 2023 Hazelcast, Inc.. All rights reserved.