|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.concurrent.ReadWriteLockSync
public class ReadWriteLockSync
A simple ReadWriteLock synchronizer.
| Field Summary |
|---|
| Fields inherited from interface net.sf.ehcache.concurrent.Sync |
|---|
ONE_CENTURY, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR |
| Constructor Summary | |
|---|---|
ReadWriteLockSync()
|
|
| Method Summary | |
|---|---|
void |
lock(LockType type)
Acquire lock of LockType.READ or WRITE |
boolean |
tryLock(LockType type,
long msec)
Tries to acquire a LockType.READ or WRITE for a certain period |
void |
unlock(LockType type)
Releases the lock held by the current Thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadWriteLockSync()
| Method Detail |
|---|
public void lock(LockType type)
lock in interface Synctype - the lock type to acquire
public boolean tryLock(LockType type,
long msec)
throws java.lang.InterruptedException
tryLock in interface Synctype - the lock type to acquiremsec - timeout
java.lang.InterruptedException - Should the thread be interruptedpublic void unlock(LockType type)
unlock in interface Synctype - the lock type to acquire
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||