public class ReEntranceLock
extends java.lang.Object
| Constructor and Description |
|---|
ReEntranceLock(int maxDepth) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check()
Run the depth check but do not set the semaphore
|
boolean |
checkAndSet()
Run the depth check and set the semaphore if depth is exceeded
|
ReEntranceLock |
clear()
Clear the semaphore
|
int |
getDepth()
Get current depth
|
int |
getMaxDepth()
Get max depth
|
boolean |
isSet()
Get whether the semaphore is set
|
ReEntranceLock |
pop()
Decrease the re-entrance depth
|
ReEntranceLock |
push()
Increase the re-entrance depth counter and set the semaphore if depth
exceeds max depth
|
ReEntranceLock |
set()
Set the semaphore
|
public int getMaxDepth()
public int getDepth()
public ReEntranceLock push()
public ReEntranceLock pop()
public boolean check()
public boolean checkAndSet()
public ReEntranceLock set()
public boolean isSet()
public ReEntranceLock clear()