FMLiveSwitchFrequentReadSynchronizedHash Class Reference

Synchronized Hash for inserts/removes. More...

Instance Methods

(bool) - containsKey:
 Return a value indicating whether ther Hash contains a value for a given key. More...
 
(long long) - count
 Gets the count of items in this hash. More...
 
(NSMutableArray *) - getArrayWithCount:
 Gets an array of a given type of a given length. More...
 
(instancetype) - init
 Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1. More...
 
(instancetype) - initWithLockObject:
 Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1. More...
 
(void) - insertWithKey:value:
 Synchronized insert into collection. More...
 
(void) - removeWithKey:
 Synchronized remove into collection. More...
 
(bool) - tryGetValueWithKey:value:
 Tries to get a value for a given key. More...
 
(NSMutableArray *) - values
 Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues. More...
 

Class Methods

(FMLiveSwitchFrequentReadSynchronizedHash *) + frequentReadSynchronizedHash
 Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1. More...
 
(FMLiveSwitchFrequentReadSynchronizedHash *) + frequentReadSynchronizedHashWithLockObject:
 Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1. More...
 

Protected Attributes

 __pad0__: NSObject- (void) clear
 

Detailed Description

Synchronized Hash for inserts/removes.

Unsynchronized for reads. Optimized for frequent reads relative to writes.

Method Documentation

◆ containsKey:

- (bool) containsKey: (TKey)  key

Return a value indicating whether ther Hash contains a value for a given key.

Parameters
keyThe key

◆ count

- (long long) count

Gets the count of items in this hash.

◆ frequentReadSynchronizedHash

+ (FMLiveSwitchFrequentReadSynchronizedHash*) frequentReadSynchronizedHash

Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1.

◆ frequentReadSynchronizedHashWithLockObject:

+ (FMLiveSwitchFrequentReadSynchronizedHash*) frequentReadSynchronizedHashWithLockObject: (id lockObject

Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1.

Parameters
lockObjectSynchronization object.

◆ getArrayWithCount:

- (NSMutableArray*) getArrayWithCount: (int)  count

Gets an array of a given type of a given length.

Parameters
count

Implemented in FMLiveSwitchIceCandidatePairSynchronizedHash.

◆ init

- (instancetype) init

Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1.

◆ initWithLockObject:

- (instancetype) initWithLockObject: (id lockObject

Creates an instance of a FMLiveSwitchFrequentReadSynchronizedList`1.

Parameters
lockObjectSynchronization object.

◆ insertWithKey:value:

- (void) insertWithKey: (TKey)  key
value: (TValue)  value 

Synchronized insert into collection.

Parameters
valueValue
keyKey

◆ removeWithKey:

- (void) removeWithKey: (TKey)  key

Synchronized remove into collection.

Parameters
keyKey

◆ tryGetValueWithKey:value:

- (bool) tryGetValueWithKey: (TKey)  key
value: (TValue *)  value 

Tries to get a value for a given key.

Parameters
keyThe key
valueThe value

◆ values

- (NSMutableArray*) values

Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues.

May be missing newly added or removed values.

Member Data Documentation

◆ __pad0__

- __pad0__
protected