|
Colt 1.0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.oswego.cs.dl.util.concurrent.SyncMap
SyncMaps wrap Sync-based control around java.util.Maps. They operate in the same way as SyncCollection.
Reader operations are
[ Introduction to this package. ]
SyncCollection
Inner classes inherited from class java.util.Map |
Map.Entry |
Constructor Summary | |
SyncMap(Map map,
ReadWriteLock rwl)
Create a new SyncMap protecting the given map, and using the given ReadWriteLock to control reader and writer methods. |
|
SyncMap(Map map,
Sync sync)
Create a new SyncMap protecting the given map, and using the given sync to control both reader and writer methods. |
|
SyncMap(Map map,
Sync readLock,
Sync writeLock)
Create a new SyncMap protecting the given map, and using the given pair of locks to control reader and writer methods. |
Method Summary | |
void |
clear()
|
boolean |
containsKey(Object o)
|
boolean |
containsValue(Object o)
|
Set |
entrySet()
|
boolean |
equals(Object o)
|
Object |
get(Object key)
|
int |
hashCode()
|
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map coll)
|
Sync |
readerSync()
Return the Sync object managing read-only operations |
Object |
remove(Object key)
|
int |
size()
|
long |
syncFailures()
Return the number of synchronization failures for read-only operations |
Collection |
values()
|
Sync |
writerSync()
Return the Sync object managing mutative operations |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SyncMap(Map map, Sync sync)
public SyncMap(Map map, ReadWriteLock rwl)
public SyncMap(Map map, Sync readLock, Sync writeLock)
Method Detail |
public Sync readerSync()
public Sync writerSync()
public long syncFailures()
public int hashCode()
hashCode
in interface Map
hashCode
in class Object
public boolean equals(Object o)
equals
in interface Map
equals
in class Object
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object o)
containsKey
in interface Map
public boolean containsValue(Object o)
containsValue
in interface Map
public Object get(Object key)
get
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public Object remove(Object key)
remove
in interface Map
public void putAll(Map coll)
putAll
in interface Map
public void clear()
clear
in interface Map
public Set keySet()
keySet
in interface Map
public Set entrySet()
entrySet
in interface Map
public Collection values()
values
in interface Map
|
Colt 1.0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |