Node#getExecutionMode()
Modifier and Type | Class and Description |
---|---|
public static enum | ExclusiveResource.
|
Modifier and Type | Field and Description |
---|---|
public static final String | GLOBAL_KEY
Key of the global resource lock that all direct children of the engine descriptor acquire in read mode by default: org.junit.platform.engine.support.hierarchical.ExclusiveResource.GLOBAL_KEY If any node requires an exclusive resource with the same key in read-write mode, the lock will be coarsened to be acquired by the node's ancestor that is a direct child of the engine descriptor and all of the ancestor's descendants will be forced to run in the same thread. |
pack-priv static final ExclusiveResource | |
pack-priv static final ExclusiveResource | |
private int | |
private final String | |
private final ExclusiveResource. |
Access | Constructor and Description |
---|---|
public | ExclusiveResource(String
the identifier of the resource; never key, ExclusiveResource.null or blankthe lock mode to use to synchronize access to the
resource; never lockModenull Create a new |
Modifier and Type | Method and Description |
---|---|
public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
public String | |
public ExclusiveResource. | |
public int | |
public String |
GLOBAL_KEY | back to summary |
---|---|
public static final String GLOBAL_KEY Key of the global resource lock that all direct children of the engine descriptor acquire in read mode by default: org.junit.platform.engine.support.hierarchical.ExclusiveResource.GLOBAL_KEY If any node requires an exclusive resource with the same key in read-write mode, the lock will be coarsened to be acquired by the node's ancestor that is a direct child of the engine descriptor and all of the ancestor's descendants will be forced to run in the same thread.
|
GLOBAL_READ | back to summary |
---|---|
pack-priv static final ExclusiveResource GLOBAL_READ |
GLOBAL_READ_WRITE | back to summary |
---|---|
pack-priv static final ExclusiveResource GLOBAL_READ_WRITE |
hash | back to summary |
---|---|
private int hash |
key | back to summary |
---|---|
private final String key |
lockMode | back to summary |
---|---|
private final ExclusiveResource. |
ExclusiveResource | back to summary |
---|---|
public ExclusiveResource(String key, ExclusiveResource. Create a new
|
equals | back to summary |
---|---|
public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. |
getKey | back to summary |
---|---|
public String getKey() Get the key of this resource. |
getLockMode | back to summary |
---|---|
public ExclusiveResource. Get the lock mode of this resource. |
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object. |
LockMode
translates to the respective ReadWriteLock
locks.
Implementation Note
Enum order is important, since it can be used to sort locks, so the stronger mode has to be first.
Modifier and Type | Field and Description |
---|---|
public static final ExclusiveResource. | READ
Require only read access to the resource. |
public static final ExclusiveResource. | READ_WRITE
Require read and write access to the resource. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static ExclusiveResource. | |
public static ExclusiveResource. |
READ | back to summary |
---|---|
public static final ExclusiveResource. Require only read access to the resource.
|
READ_WRITE | back to summary |
---|---|
public static final ExclusiveResource. Require read and write access to the resource.
|
LockMode | back to summary |
---|---|
private LockMode() |
valueOf | back to summary |
---|---|
public static ExclusiveResource. |
values | back to summary |
---|---|
public static ExclusiveResource. |