|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.util.ManagedReadWriteLock
public class ManagedReadWriteLock
Simple read-write lock based on ReentrantReadWriteLock
that associates a
name with the lock and traces read/write locking and unlocking.
Field Summary | |
---|---|
protected static String |
ACQUIRE_TEXT
Acquire text. |
protected static String |
ACQUIRED_TEXT
Acquired text. |
protected static String |
RELEASE_TEXT
Release text. |
protected static String |
RELEASED_TEXT
Released text. |
protected static String |
TRY_TEXT
Acquired text. |
Constructor Summary | |
---|---|
ManagedReadWriteLock(String name,
boolean isFair)
Ctor. |
Method Summary | |
---|---|
void |
acquireReadLock()
Lock read lock. |
void |
acquireWriteLock()
Lock write lock. |
void |
releaseReadLock()
Unlock read lock. |
void |
releaseWriteLock()
Unlock write lock. |
boolean |
tryWriteLock(long msec)
Try write lock with timeout, returning an indicator whether the lock was acquired or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String ACQUIRE_TEXT
protected static final String ACQUIRED_TEXT
protected static final String TRY_TEXT
protected static final String RELEASE_TEXT
protected static final String RELEASED_TEXT
Constructor Detail |
---|
public ManagedReadWriteLock(String name, boolean isFair)
name
- of lockisFair
- true if a fair lock, false if notMethod Detail |
---|
public void acquireWriteLock()
public boolean tryWriteLock(long msec)
msec
- number of milliseconds to wait for lock
public void releaseWriteLock()
public void acquireReadLock()
public void releaseReadLock()
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |