|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ideo.sweetdev.core.util.LockManager
Utility class that manager multi-Thread access on readable/writtable resource.

| Field Summary | |
static long |
MAXWAITING_LCKACCES
max time waiting for lock access |
static long |
MAXWAITING_READING
max time waiting for reading |
static long |
MAXWAITING_UPDATING
max time waiting for updating |
| Constructor Summary | |
LockManager()
Creates a new LockManager object. |
|
LockManager(long _waitingForReading,
long _waitingForUpdating)
Creates a new LockManager object. |
|
| Method Summary | |
void |
getReadAccessLock()
Try to get a reading access right. |
long |
getWaitingForReadingTime()
get time wainting for reading |
long |
getWaitingForUpdatingTime()
get time waiting for updating |
void |
notifyAllWaitingThreads()
Wake up every threads waiting for any access. |
void |
notifyReaders()
Wake up every threads waiting for reading access. |
void |
notifyUpdaters()
Wake up every threads waiting for updating access. |
void |
releaseReadAccessLock()
Release reading access right. |
void |
releaseWriteAccessLock()
release the write access lock |
void |
releaseWriteAccessLock(int _lockCounter)
Release writting access right. |
void |
releaseWriteAccessLockAll()
release all the write access locks |
void |
setWriteAccessLock()
Set a writting access right. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long MAXWAITING_READING
public static final long MAXWAITING_UPDATING
public static final long MAXWAITING_LCKACCES
| Constructor Detail |
public LockManager()
public LockManager(long _waitingForReading,
long _waitingForUpdating)
_waitingForReading - time wainting for reading_waitingForUpdating - time wainting for updating| Method Detail |
public long getWaitingForReadingTime()
public long getWaitingForUpdatingTime()
public void getReadAccessLock()
throws TechnicalException
TechnicalException - te
public void setWriteAccessLock()
throws TechnicalException
TechnicalException - tepublic void releaseWriteAccessLock(int _lockCounter)
_lockCounter - intpublic void releaseWriteAccessLock()
public void releaseWriteAccessLockAll()
public void releaseReadAccessLock()
public void notifyReaders()
public void notifyUpdaters()
public void notifyAllWaitingThreads()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||