Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class WrapperCollections.ConcurrentWrapperEntry

java.lang.Object
  extended by com.tangosol.util.WrapperCollections.ConcurrentWrapperEntry

All Implemented Interfaces:
java.util.Map.Entry
Enclosing class:
WrapperCollections

public static class WrapperCollections.ConcurrentWrapperEntry
extends java.lang.Object
implements java.util.Map.Entry

Map Entry implementation which uses a ReadWriteLock to manage concurrent access to an underlying Map Entry.

Since:
Coherence 3.7

Field Summary
protected  java.util.concurrent.locks.ReadWriteLock m_lock
          The read/write lock for concurrency control.
protected  java.util.concurrent.locks.Lock m_lockExclusive
          The exclusive lock for performing read/write operations.
protected  java.util.concurrent.locks.Lock m_lockShared
          The shared lock for performing read operations.

 

Constructor Summary
  WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry)
          Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.
protected WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry, java.util.concurrent.locks.ReadWriteLock lock)
          Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.
protected WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry, java.util.concurrent.locks.ReadWriteLock lock, boolean fStrict)
          Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.

 

Method Summary
 boolean equals(java.lang.Object o)
          
protected  java.util.Map.Entry getDelegate()
          Return the Collection to which all operations should be delegated to.
 java.lang.Object getKey()
          
protected  java.util.concurrent.locks.ReadWriteLock getLock()
          Return the ReadWriteLock that is used to manage concurrent access and modifications to the underlying map.
 java.lang.Object getValue()
          
 int hashCode()
          
 java.lang.Object setValue(java.lang.Object value)
          
 java.lang.String toString()
          

 

Field Detail

m_lock

protected final java.util.concurrent.locks.ReadWriteLock m_lock
The read/write lock for concurrency control.

m_lockShared

protected final java.util.concurrent.locks.Lock m_lockShared
The shared lock for performing read operations.

Note: This field is null if read-only operations are not supposed to be protected, i.e. if the "strict" option is not used.


m_lockExclusive

protected final java.util.concurrent.locks.Lock m_lockExclusive
The exclusive lock for performing read/write operations.

Constructor Detail

WrapperCollections.ConcurrentWrapperEntry

public WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry)
Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.
Parameters:
entry - the Map Entry to delegate all calls to

WrapperCollections.ConcurrentWrapperEntry

protected WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry,
                                                    java.util.concurrent.locks.ReadWriteLock lock)
Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.
Parameters:
entry - the Map Entry to delegate all calls to
lock - a read/write lock for concurrency management

WrapperCollections.ConcurrentWrapperEntry

protected WrapperCollections.ConcurrentWrapperEntry(java.util.Map.Entry entry,
                                                    java.util.concurrent.locks.ReadWriteLock lock,
                                                    boolean fStrict)
Create an ConcurrentWrapperEntry which delegates to the specified Map Entry.
Parameters:
entry - the Map Entry to delegate all calls to
lock - a read/write lock for concurrency management
fStrict - pass true to protect all Entry methods; false to protect only the setValue() method

Method Detail

getKey

public java.lang.Object getKey()
Specified by:
getKey in interface java.util.Map.Entry

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface java.util.Map.Entry

setValue

public java.lang.Object setValue(java.lang.Object value)
Specified by:
setValue in interface java.util.Map.Entry

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map.Entry

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map.Entry

toString

public java.lang.String toString()

getDelegate

protected java.util.Map.Entry getDelegate()
Return the Collection to which all operations should be delegated to.
Returns:
the wrapped Collection

getLock

protected java.util.concurrent.locks.ReadWriteLock getLock()
Return the ReadWriteLock that is used to manage concurrent access and modifications to the underlying map.
Returns:
the ReadWriteLock

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.