@API(status=EXPERIMENTAL,
since="1.3")
public class ExclusiveResource
extends java.lang.Object
Node.getExecutionMode()
Modifier and Type | Class and Description |
---|---|
static class |
ExclusiveResource.LockMode
LockMode translates to the respective ReadWriteLock
locks. |
Modifier and Type | Field and Description |
---|---|
private int |
hash |
private java.lang.String |
key |
private ExclusiveResource.LockMode |
lockMode |
Constructor and Description |
---|
ExclusiveResource(java.lang.String key,
ExclusiveResource.LockMode lockMode)
Create a new
ExclusiveResource . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getKey()
Get the key of this resource.
|
ExclusiveResource.LockMode |
getLockMode()
Get the lock mode of this resource.
|
int |
hashCode() |
java.lang.String |
toString() |
private final java.lang.String key
private final ExclusiveResource.LockMode lockMode
private int hash
public ExclusiveResource(java.lang.String key, ExclusiveResource.LockMode lockMode)
ExclusiveResource
.key
- the identifier of the resource; never null
or blanklockMode
- the lock mode to use to synchronize access to the
resource; never null
public java.lang.String getKey()
public ExclusiveResource.LockMode getLockMode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object