org.multiverse.transactional.collections
Interface TransactionalMap<K,V>
- Type Parameters:
K - the key type for the mapV - the value type for the map
- All Superinterfaces:
- java.util.concurrent.ConcurrentMap<K,V>, java.util.Map<K,V>
public interface TransactionalMap<K,V>
- extends java.util.concurrent.ConcurrentMap<K,V>
A Transactional version of the ConcurrentMap.
- Author:
- Peter Veentjer.
- See Also:
ConcurrentMap,
Map
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
size
int size()
- Specified by:
size in interface java.util.Map<K,V>
atomicSize
int atomicSize()
- Returns the current size of the TransactionalMap. The big difference between
the normal
size() method is that this one returns the actual size of
this map and doesn't look at the current transaction. So you could see changes
made by other threads.
- Returns:
- the current size of the TransactionalMap.
isEmpty
boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Map<K,V>
containsKey
boolean containsKey(java.lang.Object key)
- Specified by:
containsKey in interface java.util.Map<K,V>
containsValue
boolean containsValue(java.lang.Object value)
- Specified by:
containsValue in interface java.util.Map<K,V>
get
V get(java.lang.Object key)
- Specified by:
get in interface java.util.Map<K,V>
keySet
java.util.Set<K> keySet()
- Specified by:
keySet in interface java.util.Map<K,V>
values
java.util.Collection<V> values()
- Specified by:
values in interface java.util.Map<K,V>
entrySet
java.util.Set<java.util.Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface java.util.Map<K,V>
toString
java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Map<K,V>- Overrides:
equals in class java.lang.Object
hashCode
int hashCode()
- Specified by:
hashCode in interface java.util.Map<K,V>- Overrides:
hashCode in class java.lang.Object
put
V put(K key,
V value)
- Specified by:
put in interface java.util.Map<K,V>
remove
V remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map<K,V>
putAll
void putAll(java.util.Map<? extends K,? extends V> m)
- Specified by:
putAll in interface java.util.Map<K,V>
clear
void clear()
- Specified by:
clear in interface java.util.Map<K,V>
putIfAbsent
V putIfAbsent(K key,
V value)
- Specified by:
putIfAbsent in interface java.util.concurrent.ConcurrentMap<K,V>
remove
boolean remove(java.lang.Object key,
java.lang.Object value)
- Specified by:
remove in interface java.util.concurrent.ConcurrentMap<K,V>
replace
boolean replace(K key,
V oldValue,
V newValue)
- Specified by:
replace in interface java.util.concurrent.ConcurrentMap<K,V>
replace
V replace(K key,
V value)
- Specified by:
replace in interface java.util.concurrent.ConcurrentMap<K,V>
Copyright © 2008-2010 Multiverse. All Rights Reserved.