public class LockListener extends Object
This class is for internal use by the platform-related plug-ins. Clients outside of the base platform should not reference or subclass this class.
IJobManager.setLockListener(LockListener)
Constructor and Description |
---|
LockListener() |
Modifier and Type | Method and Description |
---|---|
void |
aboutToRelease()
Notification that a thread is about to release a lock.
|
boolean |
aboutToWait(Thread lockOwner)
Notification that a thread is about to block on an attempt to acquire a lock.
|
boolean |
canBlock()
Returns if it is safe for the calling thread to block while waiting to obtain
a lock.
|
protected boolean |
isLockOwnerThread()
Returns whether this thread currently owns any locks
|
public boolean aboutToWait(Thread lockOwner)
This default implementation always returns false
.
Subclasses may override.
lockOwner
- the thread that currently owns the lock this thread is
waiting for, or null
if unknown.true
if the thread should be granted immediate access,
and false
if it should wait for the lock to be availablepublic void aboutToRelease()
This default implementation does nothing. Subclasses may override.
public boolean canBlock()
true
if this thread can block, and
false
otherwise.protected final boolean isLockOwnerThread()
true
if this thread owns any locks, and
false
otherwise.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.