bea.jolt
Class LockMonitor

java.lang.Object
  extended bybea.jolt.LockMonitor

public class LockMonitor
extends java.lang.Object

This utility class implements a simple share/exclusive lock.

See Also:
JoltRemoteService.call(bea.jolt.Transaction), JoltTransaction.commit()

Constructor Summary
LockMonitor()
           
 
Method Summary
 void getExclLock()
          Get an exclusive lock.
 void getShareLock()
          Get a shared lock.
 void releaseLock()
          Release the lock claimed by the current thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockMonitor

public LockMonitor()
Method Detail

getShareLock

public void getShareLock()
Get a shared lock. The current thread will be blocked until the shared lock is available.


getExclLock

public void getExclLock()
Get an exclusive lock. The current thread will be blocked until the exclusive lock is available.


releaseLock

public void releaseLock()
Release the lock claimed by the current thread. All waiting threads will compete for the lock.