public class JELock extends Lock
failureReason, LOCK_OBTAIN_WAIT_FOREVER, LOCK_POLL_INTERVAL
Constructor and Description |
---|
JELock() |
Modifier and Type | Method and Description |
---|---|
boolean |
isLocked()
Returns true if the resource is currently locked.
|
boolean |
obtain()
Attempts to obtain exclusive access and immediately return
upon success or failure.
|
void |
release()
Releases exclusive access.
|
public boolean obtain()
Lock
public void release()
Lock
public boolean isLocked()
Lock
Lock.obtain()
before using the resource.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.