|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sasl.distributed.lock.impl.LockSessionFactory
public class LockSessionFactory
Lock session factory that creates lock session of type
DefaultLockSession. Please see the documentation of
DefaultLockSession how this lock session works.
| Constructor Summary | |
|---|---|
LockSessionFactory()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Will release all associated resources with the factory, which also includes that all thread shared lock sessions will be released. |
ILockSession |
getActiveThreadSharedSession(boolean allowCreate)
Returns an active lock session for the current thread, if there exists one (a call to getActiveThreadSharedSession(true) was done before). |
ILockProvider |
getLockProvider()
|
boolean |
isDoThreadCheck()
|
boolean |
isStrictLockSequences()
|
ILockSession |
openNewLockSession()
Creates and configures a fresh new lock session and returns it. |
void |
release()
Releases the lock session factory. |
protected void |
removeFromCache(DefaultLockSession lockSession)
Removes the lock session from the thread shared lock session cache. |
void |
setDoThreadCheck(boolean doThreadCheck)
Sets whether thread access check should be done for created lock sessions or not. |
void |
setLockProvider(ILockProvider lockProvider)
Sets the lock provider of which created lock sessions will acquire, lock and unlock locks. |
void |
setStrictLockSequences(boolean strictLockSequences)
Sets whether strict lock sequence mode should be enabled for created lock sessions or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockSessionFactory()
| Method Detail |
|---|
public boolean isDoThreadCheck()
setDoThreadCheck(boolean)public void setDoThreadCheck(boolean doThreadCheck)
doThreadCheck - true or false.public boolean isStrictLockSequences()
setStrictLockSequences(boolean)public void setStrictLockSequences(boolean strictLockSequences)
strictLockSequences - true or false.public ILockProvider getLockProvider()
setLockProvider(ILockProvider)
public void setLockProvider(ILockProvider lockProvider)
throws IllegalArgumentException
lockProvider - non null
IllegalArgumentException - if lockProvider is null.public ILockSession getActiveThreadSharedSession(boolean allowCreate)
ILockSessionFactory
getActiveThreadSharedSession in interface ILockSessionFactoryallowCreate - true or false.
ILockSessionFactory.getActiveThreadSharedSession(boolean)protected void removeFromCache(DefaultLockSession lockSession)
lockSession - non nullpublic ILockSession openNewLockSession()
ILockSessionFactory
openNewLockSession in interface ILockSessionFactoryILockSessionFactory.openNewLockSession()public void release()
ILockSessionFactory
release in interface ILockSessionFactoryILockSessionFactory.release()
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionDisposableBean.destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||