JBoss API: Class BeanLockSupport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.ejb.plugins.lock.BeanLockSupport
Support for the BeanLock
Revisions:
2001/07/29: marcf
Field Summary | |
protected java.lang.Object |
id
The Cachekey corresponding to this Bean |
protected int |
numMethodLocks
Number of threads invoking methods on this bean (1 normally >1 if reentrant) |
protected boolean |
reentrant
Are reentrant calls allowed? |
protected int |
refs
Number of threads that retrieved this lock from the manager (0 means removing) |
protected boolean |
synched
|
protected javax.transaction.Transaction |
tx
|
protected int |
txTimeout
|
protected static java.util.HashMap |
waiting
|
Constructor Summary | |
BeanLockSupport()
|
Method Summary | |
void |
addMethodLock()
|
void |
addRef()
|
void |
deadlockDetection(javax.transaction.Transaction miTx)
|
abstract void |
endTransaction(javax.transaction.Transaction tx)
|
java.lang.Object |
getId()
|
int |
getNumMethodLocks()
|
int |
getRefs()
|
javax.transaction.Transaction |
getTransaction()
|
protected boolean |
isCallAllowed(MethodInvocation mi)
|
boolean |
isMethodLocked()
|
abstract void |
releaseMethodLock()
releaseMethodLock if we reach the count of zero it means the instance is free from threads (and reentrency) we wake up the next thread in the currentLock |
void |
releaseSync()
|
void |
removeRef()
|
abstract void |
schedule(MethodInvocation mi)
|
void |
setId(java.lang.Object id)
|
void |
setReentrant(boolean reentrant)
|
void |
setTimeout(int timeout)
|
void |
setTransaction(javax.transaction.Transaction tx)
The setTransaction associates a transaction with the lock. |
void |
sync()
|
abstract void |
wontSynchronize(javax.transaction.Transaction tx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int numMethodLocks
protected int refs
protected java.lang.Object id
protected boolean reentrant
protected javax.transaction.Transaction tx
protected boolean synched
protected int txTimeout
protected static java.util.HashMap waiting
Constructor Detail |
public BeanLockSupport()
Method Detail |
public void setId(java.lang.Object id)
setId
in interface BeanLock
public java.lang.Object getId()
getId
in interface BeanLock
public void setReentrant(boolean reentrant)
setReentrant
in interface BeanLock
public void setTimeout(int timeout)
setTimeout
in interface BeanLock
public void sync()
sync
in interface BeanLock
public void releaseSync()
releaseSync
in interface BeanLock
public abstract void schedule(MethodInvocation mi) throws java.lang.Exception
schedule
in interface BeanLock
public void setTransaction(javax.transaction.Transaction tx)
setTransaction
in interface BeanLock
public javax.transaction.Transaction getTransaction()
getTransaction
in interface BeanLock
public abstract void endTransaction(javax.transaction.Transaction tx)
endTransaction
in interface BeanLock
public abstract void wontSynchronize(javax.transaction.Transaction tx)
wontSynchronize
in interface BeanLock
public boolean isMethodLocked()
isMethodLocked
in interface BeanLock
public int getNumMethodLocks()
getNumMethodLocks
in interface BeanLock
public void addMethodLock()
addMethodLock
in interface BeanLock
public abstract void releaseMethodLock()
BeanLock
releaseMethodLock
in interface BeanLock
public void addRef()
addRef
in interface BeanLock
public void removeRef()
removeRef
in interface BeanLock
public int getRefs()
getRefs
in interface BeanLock
protected boolean isCallAllowed(MethodInvocation mi)
public void deadlockDetection(javax.transaction.Transaction miTx) throws ApplicationDeadlockException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |