Synchronized Hash for inserts/removes. More...
Public Member Functions | |
void | clear () |
Clears the synchronized hash. More... | |
boolean | containsKey (TKey key) |
Return a value indicating whether ther Hash contains a value for a given key. More... | |
long | getCount () |
Gets the count of items in this hash. More... | |
TValue[] | getValues () |
Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues. More... | |
void | insert (TKey key, TValue value) |
Synchronized insert into collection. More... | |
void | remove (TKey key) |
Synchronized remove into collection. More... | |
boolean | tryGetValue (TKey key, fm.liveswitch.Holder< TValue > value) |
Tries to get a value for a given key. More... | |
Protected Member Functions | |
FrequentReadSynchronizedHash () | |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList. More... | |
FrequentReadSynchronizedHash (Object lockObject) | |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList. More... | |
abstract TValue[] | getArray (int count) |
Gets an array of a given type of a given length. More... | |
Synchronized Hash for inserts/removes.
Unsynchronized for reads. Optimized for frequent reads relative to writes.
|
protected |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList.
|
protected |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList.
lockObject | Synchronization object. |
void fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.clear | ( | ) |
Clears the synchronized hash.
boolean fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.containsKey | ( | TKey | key | ) |
Return a value indicating whether ther Hash contains a value for a given key.
key | The key |
|
abstractprotected |
Gets an array of a given type of a given length.
count |
long fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.getCount | ( | ) |
Gets the count of items in this hash.
TValue [] fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.getValues | ( | ) |
Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues.
May be missing newly added or removed values.
void fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.insert | ( | TKey | key, |
TValue | value | ||
) |
Synchronized insert into collection.
value | Value |
key | Key |
void fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.remove | ( | TKey | key | ) |
Synchronized remove into collection.
key | Key |
boolean fm.liveswitch.FrequentReadSynchronizedHash< TKey, TValue >.tryGetValue | ( | TKey | key, |
fm.liveswitch.Holder< TValue > | value | ||
) |
Tries to get a value for a given key.
key | The key |
value | The value |