Class PersistentMemoryConfig


  • public class PersistentMemoryConfig
    extends java.lang.Object
    Configuration class for persistent memory devices (e.g. Intel Optane).
    • Constructor Detail

      • PersistentMemoryConfig

        public PersistentMemoryConfig()
      • PersistentMemoryConfig

        public PersistentMemoryConfig​(@Nonnull
                                      PersistentMemoryConfig persistentMemoryConfig)
        Constructs an instance with copying the fields of the provided PersistentMemoryConfig.
        Parameters:
        persistentMemoryConfig - The configuration to copy
        Throws:
        java.lang.NullPointerException - if persistentMemoryConfig is null
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Returns if the persistent memory is enabled.
        Returns:
        true if persistent memory allocation is enabled, false otherwise.
      • getDirectoryConfigs

        @Nonnull
        public java.util.List<PersistentMemoryDirectoryConfig> getDirectoryConfigs()
        Returns the persistent memory directory configurations to be used to store memory structures allocated by native memory manager.

        By default there are no configuration is set indicating that volatile RAM is being used.

        Returns:
        the list of the persistent memory directory configurations
      • setDirectoryConfigs

        public PersistentMemoryConfig setDirectoryConfigs​(@Nonnull
                                                          java.util.List<PersistentMemoryDirectoryConfig> directoryConfigs)
        Sets the persistent memory directory configuration to the set of directories provided in the 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.

        Parameters:
        directoryConfigs - The persistent memory directories to set
        Returns:
        this PersistentMemoryConfig instance
        Throws:
        InvalidConfigurationException - If the configured directories violate consistency or uniqueness checks.
        java.lang.NullPointerException - if directoryConfigs is null
      • addDirectoryConfig

        public PersistentMemoryConfig addDirectoryConfig​(@Nonnull
                                                         PersistentMemoryDirectoryConfig directoryConfig)
        Adds the persistent memory directory configuration to be used to store memory structures allocated by native memory manager.

        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.

        Parameters:
        directoryConfig - the persistent memory directory configuration
        Returns:
        this PersistentMemoryConfig instance
        Throws:
        InvalidConfigurationException - If the configured directories violate consistency or uniqueness checks.
        java.lang.NullPointerException - if directoryConfigs is null
      • getMode

        @Nonnull
        public PersistentMemoryMode getMode()
        Returns the mode in which the persistent memory should be used.
        Returns:
        the mode
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object