Enum ExclusiveResource.LockMode
- java.lang.Object
-
- java.lang.Enum<ExclusiveResource.LockMode>
-
- org.junit.platform.engine.support.hierarchical.ExclusiveResource.LockMode
-
- All Implemented Interfaces:
Serializable
,Comparable<ExclusiveResource.LockMode>
- Enclosing class:
- ExclusiveResource
public static enum ExclusiveResource.LockMode extends Enum<ExclusiveResource.LockMode>
LockMode
translates to the respectiveReadWriteLock
locks.- Implementation Note:
- Enum order is important, since it can be used to sort locks, so the stronger mode has to be first.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description READ
Require only read access to the resource.READ_WRITE
Require read and write access to the resource.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExclusiveResource.LockMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExclusiveResource.LockMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ_WRITE
public static final ExclusiveResource.LockMode READ_WRITE
Require read and write access to the resource.- See Also:
ReadWriteLock.writeLock()
-
READ
public static final ExclusiveResource.LockMode READ
Require only read access to the resource.- See Also:
ReadWriteLock.readLock()
-
-
Method Detail
-
values
public static ExclusiveResource.LockMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ExclusiveResource.LockMode c : ExclusiveResource.LockMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExclusiveResource.LockMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-