Javolution 6.0.0 java
|
Classes | |
class | IteratorImpl |
Public Member Functions | |
SharedMapImpl (MapService< K, V > target) | |
SharedMapImpl (MapService< K, V > target, ReadWriteLockImpl lock) | |
void | clear () |
boolean | containsKey (Object key) |
boolean | containsValue (Object value) |
V | get (Object key) |
boolean | isEmpty () |
Iterator< Entry< K, V > > | iterator () |
Equality<? super K > | keyComparator () |
V | put (K key, V value) |
void | putAll (Map<? extends K, ? extends V > m) |
V | putIfAbsent (K key, V value) |
V | remove (Object key) |
boolean | remove (Object key, Object value) |
V | replace (K key, V value) |
boolean | replace (K key, V oldValue, V newValue) |
int | size () |
MapService< K, V >[] | split (int n) |
MapService< K, V > | threadSafe () |
Equality<? super V > | valueComparator () |
MapView< K, V > | clone () |
SetService< Entry< K, V > > | entrySet () |
SetService< K > | keySet () |
void | perform (Consumer< MapService< K, V >> action, MapService< K, V > view) |
void | perform (Consumer< T > action, T part) |
void | update (Consumer< MapService< K, V >> action, MapService< K, V > view) |
void | update (Consumer< T > action, T part) |
CollectionService< V > | values () |
Protected Member Functions | |
MapService< K, V > | cloneTarget () |
MapService< K, V > | target () |
Protected Attributes | |
ReadWriteLockImpl | lock |
transient Thread | updatingThread |
Private Attributes | |
MapService< K, V > | target |
Static Private Attributes | |
static final long | serialVersionUID = 0x600L |
A shared view over a map.
Definition at line 21 of file SharedMapImpl.java.
javolution.util.internal.map.SharedMapImpl< K, V >.SharedMapImpl | ( | MapService< K, V > | target | ) |
Definition at line 60 of file SharedMapImpl.java.
References javolution.util.internal.map.MapView< K, V >.target.
javolution.util.internal.map.SharedMapImpl< K, V >.SharedMapImpl | ( | MapService< K, V > | target, |
ReadWriteLockImpl | lock | ||
) |
Definition at line 64 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, and javolution.util.internal.map.MapView< K, V >.target.
void javolution.util.internal.map.SharedMapImpl< K, V >.clear | ( | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 70 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
|
inherited |
Returns a copy of this map; updates of the copy should not impact the original.
Implements javolution.util.service.MapService< K, V >.
Reimplemented in javolution.util.internal.map.AtomicMapImpl< K, V >, and javolution.util.internal.map.FastMapImpl< K, V >.
Definition at line 232 of file MapView.java.
References javolution.util.internal.map.MapView< K, V >.clone(), and javolution.util.internal.map.MapView< K, V >.target.
Referenced by javolution.util.internal.map.MapView< K, V >.clone(), and javolution.util.internal.map.MapView< K, V >.split().
|
protected |
Returns a clone copy of target.
Definition at line 237 of file SharedMapImpl.java.
References javolution.util.internal.map.MapView< K, V >.target.
Referenced by javolution.util.internal.map.SharedMapImpl< K, V >.IteratorImpl.IteratorImpl().
boolean javolution.util.internal.map.SharedMapImpl< K, V >.containsKey | ( | Object | key | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 80 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
boolean javolution.util.internal.map.SharedMapImpl< K, V >.containsValue | ( | Object | value | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 90 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
inherited |
Returns a set view over the entries of this map. The set support adding/removing entries. Two entries are considered equals if they have the same key regardless of their values.
Implements javolution.util.service.MapService< K, V >.
Reimplemented in javolution.util.internal.map.sorted.SortedMapView< K, V >, javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >, javolution.util.internal.map.sorted.AtomicSortedMapImpl< K, V >, and javolution.util.internal.map.sorted.UnmodifiableSortedMapImpl< K, V >.
Definition at line 253 of file MapView.java.
Referenced by javolution.util.internal.map.MapView< K, V >.KeySet.KeySet(), and javolution.util.internal.map.MapView< K, V >.Values.Values().
V javolution.util.internal.map.SharedMapImpl< K, V >.get | ( | Object | key | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 100 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
boolean javolution.util.internal.map.SharedMapImpl< K, V >.isEmpty | ( | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 110 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
Iterator<Entry<K, V> > javolution.util.internal.map.SharedMapImpl< K, V >.iterator | ( | ) |
Returns an iterator over this map entries.
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 120 of file SharedMapImpl.java.
Equality<? super K> javolution.util.internal.map.SharedMapImpl< K, V >.keyComparator | ( | ) |
Returns the key comparator used for key equality or order if the map is sorted.
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 125 of file SharedMapImpl.java.
References javolution.util.internal.map.MapView< K, V >.target.
|
inherited |
Returns a set view over the key of this map, the set support adding new key for which the value is automatically
.
Implements javolution.util.service.MapService< K, V >.
Reimplemented in javolution.util.internal.map.sorted.SortedMapView< K, V >, javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >, javolution.util.internal.map.sorted.AtomicSortedMapImpl< K, V >, and javolution.util.internal.map.sorted.UnmodifiableSortedMapImpl< K, V >.
Definition at line 272 of file MapView.java.
Referenced by javolution.util.FastSet< Index >.FastSet().
|
inherited |
Reimplemented in javolution.util.internal.map.ParallelMapImpl< K, V >, and javolution.util.internal.map.SequentialMapImpl< K, V >.
Definition at line 277 of file MapView.java.
References javolution.util.internal.map.MapView< K, V >.target.
Referenced by javolution.util.internal.map.MapView< K, V >.EntrySet.perform().
|
inherited |
Executes a read-only action on the specified part of this object.
action | the read-only action. |
part | this object or a part of it. |
UnsupportedOperationException | if the action tries to update the specified part. |
V javolution.util.internal.map.SharedMapImpl< K, V >.put | ( | K | key, |
V | value | ||
) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 130 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
void javolution.util.internal.map.SharedMapImpl< K, V >.putAll | ( | Map<? extends K, ? extends V > | m | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 140 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
V javolution.util.internal.map.SharedMapImpl< K, V >.putIfAbsent | ( | K | key, |
V | value | ||
) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 150 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
V javolution.util.internal.map.SharedMapImpl< K, V >.remove | ( | Object | key | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 160 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
Referenced by javolution.util.internal.map.SharedMapImpl< K, V >.IteratorImpl.remove().
boolean javolution.util.internal.map.SharedMapImpl< K, V >.remove | ( | Object | key, |
Object | value | ||
) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 170 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
boolean javolution.util.internal.map.SharedMapImpl< K, V >.replace | ( | K | key, |
V | oldValue, | ||
V | newValue | ||
) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 190 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
V javolution.util.internal.map.SharedMapImpl< K, V >.replace | ( | K | key, |
V | value | ||
) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 180 of file SharedMapImpl.java.
References javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.lock(), javolution.util.internal.map.MapView< K, V >.target, javolution.util.internal.collection.ReadWriteLockImpl.WriteLock.unlock(), and javolution.util.internal.collection.ReadWriteLockImpl.writeLock.
int javolution.util.internal.map.SharedMapImpl< K, V >.size | ( | ) |
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 200 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
MapService<K, V> [] javolution.util.internal.map.SharedMapImpl< K, V >.split | ( | int | n | ) |
Returns
distinct parts of this object. This method may return an array of size less than
(e.g. an array of size one if this object cannot split).
n | the number of parts. |
IllegalArgumentException | if n <= 1
|
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 211 of file SharedMapImpl.java.
References javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.lock(), javolution.util.internal.map.SharedMapImpl< K, V >.lock, javolution.util.internal.collection.ReadWriteLockImpl.readLock, javolution.util.internal.map.MapView< K, V >.target, and javolution.util.internal.collection.ReadWriteLockImpl.ReadLock.unlock().
|
protectedinherited |
Returns the actual target
Reimplemented in javolution.util.internal.map.sorted.SortedMapView< K, V >, javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >, and javolution.util.internal.map.sorted.UnmodifiableSortedMapImpl< K, V >.
Definition at line 378 of file MapView.java.
References javolution.util.internal.map.MapView< K, V >.target.
MapService<K, V> javolution.util.internal.map.SharedMapImpl< K, V >.threadSafe | ( | ) |
Returns a thread-safe version of this service (used during parallel updates).
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Reimplemented in javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >.
Definition at line 227 of file SharedMapImpl.java.
|
inherited |
Reimplemented in javolution.util.internal.map.ParallelMapImpl< K, V >, javolution.util.internal.map.AtomicMapImpl< K, V >, and javolution.util.internal.map.SequentialMapImpl< K, V >.
Definition at line 361 of file MapView.java.
References javolution.util.internal.map.MapView< K, V >.target.
Referenced by javolution.util.internal.map.MapView< K, V >.EntrySet.update().
|
inherited |
Executes an update action on the specified part of this object. Any change to the part is reflected in the whole (this object).
action | the action authorized to update this object part. |
part | this object or a part of it. |
Equality<? super V> javolution.util.internal.map.SharedMapImpl< K, V >.valueComparator | ( | ) |
Returns the value comparator used for value equality.
Reimplemented from javolution.util.internal.map.MapView< K, V >.
Definition at line 232 of file SharedMapImpl.java.
References javolution.util.internal.map.MapView< K, V >.target.
|
inherited |
Returns a collection view over the values of this map, the collection support value/entry removal but not adding new values.
Implements javolution.util.service.MapService< K, V >.
Definition at line 373 of file MapView.java.
Referenced by javolution.util.internal.map.MapView< K, V >.containsValue().
|
protected |
Definition at line 57 of file SharedMapImpl.java.
Referenced by javolution.util.internal.map.SharedMapImpl< K, V >.clear(), javolution.util.internal.map.SharedMapImpl< K, V >.containsKey(), javolution.util.internal.map.SharedMapImpl< K, V >.containsValue(), javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >.firstKey(), javolution.util.internal.map.SharedMapImpl< K, V >.get(), javolution.util.internal.map.SharedMapImpl< K, V >.isEmpty(), javolution.util.internal.map.SharedMapImpl< K, V >.IteratorImpl.IteratorImpl(), javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >.lastKey(), javolution.util.internal.map.SharedMapImpl< K, V >.put(), javolution.util.internal.map.SharedMapImpl< K, V >.putAll(), javolution.util.internal.map.SharedMapImpl< K, V >.putIfAbsent(), javolution.util.internal.map.SharedMapImpl< K, V >.remove(), javolution.util.internal.map.SharedMapImpl< K, V >.replace(), javolution.util.internal.map.SharedMapImpl< K, V >.SharedMapImpl(), javolution.util.internal.map.SharedMapImpl< K, V >.size(), and javolution.util.internal.map.SharedMapImpl< K, V >.split().
|
staticprivate |
Definition at line 56 of file SharedMapImpl.java.
|
privateinherited |
Reimplemented in javolution.util.internal.map.sorted.SortedMapView< K, V >, javolution.util.internal.map.sorted.SharedSortedMapImpl< K, V >, and javolution.util.internal.map.sorted.UnmodifiableSortedMapImpl< K, V >.
Definition at line 213 of file MapView.java.
Referenced by javolution.util.internal.map.AtomicMapImpl< K, V >.AtomicMapImpl(), javolution.util.internal.map.sorted.AtomicSortedMapImpl< K, V >.AtomicSortedMapImpl(), javolution.util.internal.map.SharedMapImpl< K, V >.clear(), javolution.util.internal.map.MapView< K, V >.clone(), javolution.util.internal.map.AtomicMapImpl< K, V >.cloneTarget(), javolution.util.internal.map.SharedMapImpl< K, V >.cloneTarget(), javolution.util.internal.map.sorted.AtomicSortedMapImpl< K, V >.comparator(), javolution.util.internal.map.SequentialMapImpl< K, V >.containsKey(), javolution.util.internal.map.ParallelMapImpl< K, V >.containsKey(), javolution.util.internal.map.UnmodifiableMapImpl< K, V >.containsKey(), javolution.util.internal.map.SharedMapImpl< K, V >.containsKey(), javolution.util.internal.map.SharedMapImpl< K, V >.containsValue(), javolution.util.internal.map.SequentialMapImpl< K, V >.get(), javolution.util.internal.map.ParallelMapImpl< K, V >.get(), javolution.util.internal.map.UnmodifiableMapImpl< K, V >.get(), javolution.util.internal.map.SharedMapImpl< K, V >.get(), javolution.util.internal.map.SharedMapImpl< K, V >.isEmpty(), javolution.util.internal.map.SequentialMapImpl< K, V >.iterator(), javolution.util.internal.map.ParallelMapImpl< K, V >.iterator(), javolution.util.internal.map.SequentialMapImpl< K, V >.keyComparator(), javolution.util.internal.map.ParallelMapImpl< K, V >.keyComparator(), javolution.util.internal.map.UnmodifiableMapImpl< K, V >.keyComparator(), javolution.util.internal.map.SharedMapImpl< K, V >.keyComparator(), javolution.util.internal.map.MapView< K, V >.MapView(), javolution.util.internal.map.ParallelMapImpl< K, V >.ParallelMapImpl(), javolution.util.internal.map.ParallelMapImpl< K, V >.perform(), javolution.util.internal.map.MapView< K, V >.perform(), javolution.util.internal.map.SequentialMapImpl< K, V >.put(), javolution.util.internal.map.ParallelMapImpl< K, V >.put(), javolution.util.internal.map.AtomicMapImpl< K, V >.put(), javolution.util.internal.map.SharedMapImpl< K, V >.put(), javolution.util.internal.map.AtomicMapImpl< K, V >.putAll(), javolution.util.internal.map.SharedMapImpl< K, V >.putAll(), javolution.util.internal.map.AtomicMapImpl< K, V >.putIfAbsent(), javolution.util.internal.map.SharedMapImpl< K, V >.putIfAbsent(), javolution.util.internal.map.SequentialMapImpl< K, V >.remove(), javolution.util.internal.map.ParallelMapImpl< K, V >.remove(), javolution.util.internal.map.AtomicMapImpl< K, V >.remove(), javolution.util.internal.map.SharedMapImpl< K, V >.remove(), javolution.util.internal.map.AtomicMapImpl< K, V >.replace(), javolution.util.internal.map.SharedMapImpl< K, V >.replace(), javolution.util.internal.map.SequentialMapImpl< K, V >.SequentialMapImpl(), javolution.util.internal.map.SharedMapImpl< K, V >.SharedMapImpl(), javolution.util.internal.map.SharedMapImpl< K, V >.size(), javolution.util.internal.map.SharedMapImpl< K, V >.split(), javolution.util.internal.map.MapView< K, V >.split(), javolution.util.internal.map.MapView< K, V >.target(), javolution.util.internal.map.AtomicMapImpl< K, V >.targetView(), javolution.util.internal.map.UnmodifiableMapImpl< K, V >.UnmodifiableMapImpl(), javolution.util.internal.map.ParallelMapImpl< K, V >.update(), javolution.util.internal.map.AtomicMapImpl< K, V >.update(), javolution.util.internal.map.MapView< K, V >.update(), javolution.util.internal.map.SequentialMapImpl< K, V >.valueComparator(), javolution.util.internal.map.UnmodifiableMapImpl< K, V >.valueComparator(), javolution.util.internal.map.ParallelMapImpl< K, V >.valueComparator(), and javolution.util.internal.map.SharedMapImpl< K, V >.valueComparator().
|
protected |
Definition at line 58 of file SharedMapImpl.java.