public static class WrapperCollections.ConcurrentWrapperEntry<K,V> extends Object implements Map.Entry<K,V>
Modifier and Type | Field | Description |
---|---|---|
protected ReadWriteLock |
m_lock |
The read/write lock for concurrency control.
|
protected Lock |
m_lockExclusive |
The exclusive lock for performing read/write operations.
|
protected Lock |
m_lockShared |
The shared lock for performing read operations.
|
Modifier | Constructor | Description |
---|---|---|
|
ConcurrentWrapperEntry(Map.Entry<K,V> entry) |
Create an ConcurrentWrapperEntry which delegates to the
specified Map Entry.
|
protected |
ConcurrentWrapperEntry(Map.Entry<K,V> entry,
ReadWriteLock lock) |
Create an ConcurrentWrapperEntry which delegates to the
specified Map Entry.
|
protected |
ConcurrentWrapperEntry(Map.Entry<K,V> entry,
ReadWriteLock lock,
boolean fStrict) |
Create an ConcurrentWrapperEntry which delegates to the
specified Map Entry.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object o) |
|
protected Map.Entry<K,V> |
getDelegate() |
Return the Collection to which all operations should be delegated to.
|
K |
getKey() |
|
protected ReadWriteLock |
getLock() |
Return the ReadWriteLock that is used to manage concurrent access
and modifications to the underlying map.
|
V |
getValue() |
|
int |
hashCode() |
|
V |
setValue(V value) |
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue
protected final ReadWriteLock m_lock
protected final Lock m_lockShared
Note: This field is null if read-only operations are not supposed to be protected, i.e. if the "strict" option is not used.
protected final Lock m_lockExclusive
public ConcurrentWrapperEntry(Map.Entry<K,V> entry)
entry
- the Map Entry to delegate all calls toprotected ConcurrentWrapperEntry(Map.Entry<K,V> entry, ReadWriteLock lock)
entry
- the Map Entry to delegate all calls tolock
- a read/write lock for concurrency managementprotected ConcurrentWrapperEntry(Map.Entry<K,V> entry, ReadWriteLock lock, boolean fStrict)
entry
- the Map Entry to delegate all calls tolock
- a read/write lock for concurrency managementfStrict
- pass true to protect all Entry methods; false to
protect only the setValue() methodpublic boolean equals(Object o)
public int hashCode()
protected Map.Entry<K,V> getDelegate()
protected ReadWriteLock getLock()