Enum Class SharedMemoryOption

java.lang.Object
java.lang.Enum<SharedMemoryOption>
org.newsclub.net.unix.memory.SharedMemoryOption
All Implemented Interfaces:
Serializable, Comparable<SharedMemoryOption>, Constable

public enum SharedMemoryOption extends Enum<SharedMemoryOption>
Options for SharedMemorys.
Author:
Christian Kohlschütter
  • Enum Constant Details

    • READ_ONLY

      public static final SharedMemoryOption READ_ONLY
      Open for reading only (instead of read-write).
    • SEALABLE

      public static final SharedMemoryOption SEALABLE
      Allow sealing operations (only supported on Linux).
    • SECRET

      public static final SharedMemoryOption SECRET
      Require a more "secret" memory area.

      On Linux, this uses memfd_secret, which needs to be enabled via a kernel option (secretmem.enable=1). Note that this feature may impact overall system performance, such as disabling hibernation.

  • Method Details

    • values

      public static SharedMemoryOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SharedMemoryOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOpt

      public int getOpt()
      An value only used by junixsocket internals; do not use.
      Returns:
      The value.