Eclipse Platform
Release 3.1

org.eclipse.core.resources
Class WorkspaceLock

java.lang.Object
  extended byorg.eclipse.core.resources.WorkspaceLock

Deprecated. it is no longer possible to override the workspace lock behavior. This functionality is now provided in the platform API by implementing the org.eclipse.core.runtime.jobs.ILockListener interface.

public class WorkspaceLock
extends Object

A lock used to control write access to the resources in a workspace. Clients may subclass.

See Also:
IWorkspace.setWorkspaceLock(WorkspaceLock)

Constructor Summary
WorkspaceLock(IWorkspace workspace)
          Deprecated. Returns a new workspace lock.
 
Method Summary
 boolean acquire()
          Deprecated. Attempts to acquire this lock.
protected  Thread getCurrentOperationThread()
          Deprecated. Returns the thread that currently owns the workspace lock.
protected  boolean isTreeLocked()
          Deprecated. Returns whether the workspace tree is locked for resource changes.
 void release()
          Deprecated. Releases this lock allowing others to acquire it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceLock

public WorkspaceLock(IWorkspace workspace)
              throws CoreException
Deprecated. 
Returns a new workspace lock.

Method Detail

acquire

public boolean acquire()
                throws InterruptedException
Deprecated. 
Attempts to acquire this lock. Callers will block indefinitely until this lock comes available to them.

Clients may extend this method but should not otherwise call it.

Throws:
InterruptedException
See Also:
release()

getCurrentOperationThread

protected Thread getCurrentOperationThread()
Deprecated. 
Returns the thread that currently owns the workspace lock.


release

public void release()
Deprecated. 
Releases this lock allowing others to acquire it.

Clients may extend this method but should not otherwise call it.

See Also:
acquire()

isTreeLocked

protected boolean isTreeLocked()
Deprecated. 
Returns whether the workspace tree is locked for resource changes.

Returns:
true if the tree is locked, otherwise false

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.