org.apache.avalon.excalibur.concurrent
Interface Sync

All Known Implementing Classes:
Semaphore

Deprecated. use EDU.oswego.cs.dl.util.concurrent.Sync instead

public interface Sync

The interface to synchronization objects.

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2003/03/22 12:46:23 $
Author:
Peter Donald

Method Summary
 void acquire()
          Deprecated. Aquire access to resource.
 boolean attempt(long msec)
          Deprecated. Aquire access to resource.
 void release()
          Deprecated. Release lock.
 

Method Detail

acquire

public void acquire()
             throws InterruptedException
Deprecated. 
Aquire access to resource. This method will block until resource aquired.

Throws:
InterruptedException - if an error occurs

attempt

public boolean attempt(long msec)
                throws InterruptedException
Deprecated. 
Aquire access to resource. This method will block for a maximum of msec.

Parameters:
msec - the duration to wait for lock to be released
Returns:
true if lock aquired, false on timeout
Throws:
InterruptedException - if an error occurs

release

public void release()
Deprecated. 
Release lock.



Copyright © 2000-2003 Apache Jakarta Project. All Rights Reserved.