Enum Class SharedMemoryOption
- All Implemented Interfaces:
Serializable, Comparable<SharedMemoryOption>, Constable
Options for
SharedMemorys.- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOpen for reading only (instead of read-write).Allow sealing operations (only supported on Linux).Require a more "secret" memory area.Unlink the object upon callingSharedMemory.close(). -
Method Summary
Modifier and TypeMethodDescriptionintgetOpt()An value only used by junixsocket internals; do not use.static SharedMemoryOptionReturns the enum constant of this class with the specified name.static SharedMemoryOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ_ONLY
Open for reading only (instead of read-write). -
SEALABLE
Allow sealing operations (only supported on Linux). -
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. -
UNLINK_UPON_CLOSE
Unlink the object upon callingSharedMemory.close().
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getOpt
public int getOpt()An value only used by junixsocket internals; do not use.- Returns:
- The value.
-