com.ibm.commons.util
Interface ThreadLock


public interface ThreadLock

Thread lock used by the ThreadLock manager.


Method Summary
 boolean acquire()
          Acquire a lock.
 boolean isLocked()
          Check if the lock is already in use.
 void release()
          Release the lock.
 boolean tryAcquire()
          Try to acquire a lock.
 

Method Detail

acquire

boolean acquire()
                throws java.lang.InterruptedException
Acquire a lock.

Throws:
java.lang.InterruptedException

tryAcquire

boolean tryAcquire()
                   throws java.lang.InterruptedException
Try to acquire a lock.

Throws:
java.lang.InterruptedException

isLocked

boolean isLocked()
Check if the lock is already in use.


release

void release()
Release the lock.