Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime.jobs
Class LockListener


java.lang.Object
  extended by 
org.eclipse.core.runtime.jobs.LockListener

public class LockListener
extends Object

A lock listener is notified whenever a thread is about to wait on a lock, and when a thread is about to release a lock.

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.

Since:
3.0
See Also:
IJobManager.setLockListener(LockListener)

Constructor Summary
LockListener ()
           
 
Method Summary
 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.
protected  boolean isLockOwnerThread ()
          Returns whether this thread currently owns any locks
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockListener

public LockListener()
Method Detail

aboutToWait

public boolean aboutToWait(
Thread lockOwner)
Notification that a thread is about to block on an attempt to acquire a lock. Returns whether the thread should be granted immediate access to the lock.

This default implementation always returns false. Subclasses may override.

Parameters:
lockOwner - the thread that currently owns the lock this thread is waiting for, or null if unknown.
Returns:
true if the thread should be granted immediate access, and false if it should wait for the lock to be available

aboutToRelease

public void aboutToRelease()
Notification that a thread is about to release a lock.

This default implementation does nothing. Subclasses may override.


isLockOwnerThread

protected final boolean isLockOwnerThread()
Returns whether this thread currently owns any locks

Returns:
true if this thread owns any locks, and false otherwise.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire