Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class WrapperCollections.ConcurrentWrapperMap

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

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

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

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

Since:
Coherence 3.7

Nested Class Summary

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry

 

Field Summary
protected  java.util.Collection m_collValues
          The values collection.
protected  boolean m_fStrict
          Determines whether or not all of the Entry methods are protected; if set to true, then all Entry methods are protected.
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.
protected  java.util.Set m_setEntries
          The entry set.
protected  java.util.Set m_setKeys
          The key set.

 

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

 

Method Summary
 void clear()
          
 boolean containsKey(java.lang.Object oKey)
          
 boolean containsValue(java.lang.Object oValue)
          
 java.util.Set entrySet()
          
 boolean equals(java.lang.Object oOther)
          
 java.lang.Object get(java.lang.Object oKey)
          
protected  java.util.Map getDelegate()
          Return the Map to which all operations should be delegated to.
protected  java.util.concurrent.locks.ReadWriteLock getLock()
          Return the ReadWriteLock that is used to manage concurrent access and modifications to the underlying map.
 int hashCode()
          
 boolean isEmpty()
          
 java.util.Set keySet()
          
 java.lang.Object put(java.lang.Object oKey, java.lang.Object oValue)
          
 void putAll(java.util.Map map)
          
 java.lang.Object remove(java.lang.Object oKey)
          
 int size()
          
 java.lang.String toString()
          
 java.util.Collection values()
          

 

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.

m_lockExclusive

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

m_setKeys

protected java.util.Set m_setKeys
The key set.

m_setEntries

protected java.util.Set m_setEntries
The entry set.

m_collValues

protected java.util.Collection m_collValues
The values collection.

m_fStrict

protected final boolean m_fStrict
Determines whether or not all of the Entry methods are protected; if set to true, then all Entry methods are protected.

Constructor Detail

WrapperCollections.ConcurrentWrapperMap

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

WrapperCollections.ConcurrentWrapperMap

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

WrapperCollections.ConcurrentWrapperMap

protected WrapperCollections.ConcurrentWrapperMap(java.util.Map map,
                                                  java.util.concurrent.locks.ReadWriteLock lock,
                                                  boolean fStrict)
Create an ConcurrentWrapperMap which delegates to the specified Map.
Parameters:
map - the Map 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

getDelegate

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

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

clear

public void clear()
Specified by:
clear in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object oKey)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object oValue)
Specified by:
containsValue in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

get

public java.lang.Object get(java.lang.Object oKey)
Specified by:
get in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

put

public java.lang.Object put(java.lang.Object oKey,
                            java.lang.Object oValue)
Specified by:
put in interface java.util.Map

putAll

public void putAll(java.util.Map map)
Specified by:
putAll in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object oKey)
Specified by:
remove in interface java.util.Map

size

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

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

equals

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

hashCode

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

toString

public java.lang.String toString()

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.