| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient Thread | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final boolean | isHeldExclusively()
Overrides java. true if synchronization is held exclusively with
respect to the current (calling) thread.
|
| public final void | |
| protected final boolean | tryAcquire(int
the acquire argument. This value is always the one
passed to an acquire method, or is the value saved on entry
to a condition wait. The value is otherwise uninterpreted
and can represent anything you like. acquires)Overrides java. |
| protected final boolean | tryRelease(int
the release argument. This value is always the one
passed to a release method, or the current state value upon
entry to a condition wait. The value is otherwise
uninterpreted and can represent anything you like. releases)Overrides java. |
| public final void |
| owner | back to summary |
|---|---|
| pack-priv transient Thread owner | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| LockableObject | back to summary |
|---|---|
| public LockableObject() | |
| isHeldExclusively | back to summary |
|---|---|
| protected final boolean isHeldExclusively() Overrides java. Doc from java. Returns The default implementation throws
| |
| lock | back to summary |
|---|---|
| public final void lock() | |
| tryAcquire | back to summary |
|---|---|
| protected final boolean tryAcquire(int acquires) Overrides java. Doc from java. Attempts to acquire in exclusive mode. This method should query if the state of the object permits it to be acquired in the exclusive mode, and if so to acquire it. This method is always invoked by the thread performing
acquire. If this method reports failure, the acquire method
may queue the thread, if it is not already queued, until it is
signalled by a release from some other thread. This can be used
to implement method The default
implementation throws
| |
| tryRelease | back to summary |
|---|---|
| protected final boolean tryRelease(int releases) Overrides java. Doc from java. Attempts to set the state to reflect a release in exclusive mode. This method is always invoked by the thread performing release. The default implementation throws
| |
| unlock | back to summary |
|---|---|
| public final void unlock() | |