Class PersistentMemoryDirectoryConfig


  • public class PersistentMemoryDirectoryConfig
    extends java.lang.Object
    Configuration class for directories that persistent memories are mounted at.
    • Constructor Detail

      • PersistentMemoryDirectoryConfig

        public PersistentMemoryDirectoryConfig​(@Nonnull
                                               java.lang.String directory)
        Creates an instance with the directory specified.
        Parameters:
        directory - The directory where the persistent memory is mounted at
        Throws:
        java.lang.NullPointerException - if directory is null
      • PersistentMemoryDirectoryConfig

        public PersistentMemoryDirectoryConfig​(@Nonnull
                                               java.lang.String directory,
                                               int numaNode)
        Creates an instance with the directory and NUMA node specified.

        Note that setting numaNode to -1 on any of the configured PersistentMemoryDirectoryConfig instances disables NUMA-aware persistent memory allocation.

        Parameters:
        directory - The directory where the persistent memory is mounted at
        numaNode - The NUMA node that the persistent memory mounted to the given directory is attached to.
        Throws:
        java.lang.NullPointerException - if directory is null
      • PersistentMemoryDirectoryConfig

        public PersistentMemoryDirectoryConfig​(@Nonnull
                                               PersistentMemoryDirectoryConfig directoryConfig)
        Constructs an instance by copying the provided PersistentMemoryDirectoryConfig.
        Parameters:
        directoryConfig - The configuration to copy
        Throws:
        java.lang.NullPointerException - if directoryConfig is null
    • Method Detail

      • setDirectory

        public void setDirectory​(@Nonnull
                                 java.lang.String directory)
        Returns the directory of this PersistentMemoryDirectoryConfig.
        Parameters:
        directory - the directory to set
        Throws:
        java.lang.NullPointerException - if directory is null
      • getNumaNode

        public int getNumaNode()
        Returns the NUMA node the persistent memory mounted to the given directory is attached to.
        Returns:
        the NUMA node of the persistent memory
      • setNumaNode

        public void setNumaNode​(int numaNode)
        Sets the NUMA node the persistent memory mounted to the given directory is attached to.

        Note that setting numaNode to -1 on any of the configured PersistentMemoryDirectoryConfig instances disables NUMA-aware persistent memory allocation.

        Parameters:
        numaNode - the NUMA node to set
      • isNumaNodeSet

        public boolean isNumaNodeSet()
        Returns if the NUMA node for the given persistent memory directory is set.
        Returns:
        true if the NUMA node is set, false otherwise
      • 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