站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

BeanLockManager (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb
Class BeanLockManager

java.lang.Object
  extended byorg.jboss.ejb.BeanLockManager

public class BeanLockManager
extends 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.

Author:
Bill Burke, Marc Fleury, Scott.Stark@jboss.org

Field Summary
 Class lockClass
           
protected  LockMonitor monitor
           
 
Constructor Summary
BeanLockManager(Container container)
           
 
Method Summary
 boolean canPassivate(Object id)
           
 BeanLock getLock(Object id)
          returns the lock associated with the key passed.
 LockMonitor getLockMonitor()
           
 void removeLockRef(Object id)
           
 void setContainer(Container container)
           
 void setLockCLass(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 Class lockClass

monitor

protected LockMonitor monitor
Constructor Detail

BeanLockManager

public BeanLockManager(Container container)
Method Detail

getLockMonitor

public LockMonitor getLockMonitor()

getLock

public BeanLock getLock(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(Object id)

canPassivate

public boolean canPassivate(Object id)

setLockCLass

public void setLockCLass(Class lockClass)

setReentrant

public void setReentrant(boolean reentrant)

setContainer

public void setContainer(Container container)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.