JBoss API: Class BeanLockManager

org.jboss.ejb
Class BeanLockManager

java.lang.Object
  |
  +--org.jboss.ejb.BeanLockManager

public class BeanLockManager
extends java.lang.Object

Manages BeanLocks. All BeanLocks have a reference count. When the reference count goes to 0, the lock is released from the id -> lock mapping.

Version:
$Revision: 1.5.4.2 $

Revisions:

20010802: marcf

  1. Made bean lock pluggable, container factory passes in lockClass
  2. Removed un-used constructor, added getters and setters
Author:
Bill Burke, Marc Fleury

Field Summary
 java.lang.Class lockClass
           
 
Constructor Summary
BeanLockManager()
           
 
Method Summary
 BeanLock getLock(java.lang.Object id)
          returns the lock associated with the key passed.
 void removeLockRef(java.lang.Object id)
           
 void setLockCLass(java.lang.Class lockClass)
           
 void setReentrant(boolean reentrant)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lockClass

public java.lang.Class lockClass
Constructor Detail

BeanLockManager

public BeanLockManager()
Method Detail

getLock

public BeanLock getLock(java.lang.Object id)
returns the lock associated with the key passed. If there is no lock one is created this call also increments the number of references interested in Lock. WARNING: All access to this method MUST have an equivalent removeLockRef cleanup call, or this will create a leak in the map,

removeLockRef

public void removeLockRef(java.lang.Object id)

setLockCLass

public void setLockCLass(java.lang.Class lockClass)

setReentrant

public void setReentrant(boolean reentrant)


Copyright © 2000 The JBoss Organization. All Rights Reserved.