![]() |
SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
|
Implementation of IIndexedCachedList More...
Inheritance diagram for erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >:
Collaboration diagram for erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >:Public Member Functions | |
| IndexedCachedList (Func< List< T >> retrieveFunc, Func< T, TK > indexFunc, Caching caching) | |
| bool | ContainsKey (TK key) |
| T | Get (TK key) |
| new IIndexedCachedList< TK, T > | Refreshed () |
| bool | TryGet (TK key, out T obj) |
| void | WaitFor (Predicate< IIndexedCachedList< TK, T >> predicate, TimeSpan maxWait, TimeSpan retryPeriod) |
Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.CachedList< T > | |
| CachedList (Func< List< T >> retrieveFunc, Caching caching) | |
| T | GetByPosition (int pos) |
| IEnumerator< T > | GetEnumerator () |
| virtual void | InvalidateCache () |
| void | Refresh () |
| ICachedList< T > | Refreshed () |
| void | WaitFor (Predicate< ICachedList< T >> predicate, TimeSpan wait, TimeSpan retryPeriod) |
Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.ICachedList< out T > | |
| T | GetByPosition (int pos) |
| Get an element of the list at a specific position. | |
| ICachedList< T > | Refreshed () |
| Calls Refresh() and returns this. | |
| void | WaitFor (Predicate< ICachedList< T >> predicate, TimeSpan wait, TimeSpan retryPeriod) |
| Waits until a predicate on itself becomes true. Every retry period Refresh() is called and the predicate evaluated again, until the predicate evaluates to true, or the wait timespan is exhausted. | |
Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.ICached | |
| void | InvalidateCache () |
| Clear the cache and refresh it on the next access. | |
| void | Refresh () |
| Updates the cache immediatly. | |
Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T > | |
| bool | ContainsKey (TK key) |
| Check wether the index contains a specific key. If you want to get an element, if it is available, use TryGet as it is faster than a call to ContainsKey and a Get afterwards. | |
| T | Get (TK key) |
| Get an entry with a specific key value. Throws an exception if entry could not be found. | |
| new IIndexedCachedList< TK, T > | Refreshed () |
| bool | TryGet (TK name, out T obj) |
| Try to get an entry with a specific key value, returns false, if entry could not be found. | |
| void | WaitFor (Predicate< IIndexedCachedList< TK, T >> predicate, TimeSpan maxWait, TimeSpan retryPeriod) |
Protected Member Functions | |
| IndexedCachedList (Func< T, TK > indexFunc, Caching caching) | |
Protected Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.CachedList< T > | |
| CachedList (Caching caching) | |
| void | EnsureListIsLoaded () |
Properties | |
| override bool | IsCachingEnabled [set] |
| override List< T > | List [set] |
| T | this[TK key] [get] |
Properties inherited from erminas.SmartAPI.Utils.CachedCollections.CachedList< T > | |
| int | Count [get] |
| virtual bool | IsCachingEnabled [get, set] |
| virtual List< T > | List [get, set] |
| Func< List< T > > | RetrieveFunc [get, set] |
Properties inherited from erminas.SmartAPI.Utils.CachedCollections.ICachedList< out T > | |
| int | Count [get] |
| bool | IsCachingEnabled [get, set] |
| True == caching is enabled False == caching is disabled | |
Properties inherited from erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T > | |
| T | this[TK key] [get] |
| Same as GetByName only as indexer. | |
Implementation of IIndexedCachedList
| T | : | class |
Definition at line 25 of file IndexedCachedList.cs.
| erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.IndexedCachedList | ( | Func< List< T >> | retrieveFunc, |
| Func< T, TK > | indexFunc, | ||
| Caching | caching | ||
| ) |
Definition at line 30 of file IndexedCachedList.cs.
|
protected |
Definition at line 35 of file IndexedCachedList.cs.
| bool erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.ContainsKey | ( | TK | key | ) |
Definition at line 75 of file IndexedCachedList.cs.
| T erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.Get | ( | TK | key | ) |
Definition at line 81 of file IndexedCachedList.cs.
| new IIndexedCachedList<TK, T> erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.Refreshed | ( | ) |
Definition at line 130 of file IndexedCachedList.cs.
| bool erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.TryGet | ( | TK | key, |
| out T | obj | ||
| ) |
Definition at line 136 of file IndexedCachedList.cs.
| void erminas.SmartAPI.Utils.CachedCollections.IndexedCachedList< TK, T >.WaitFor | ( | Predicate< IIndexedCachedList< TK, T >> | predicate, |
| TimeSpan | maxWait, | ||
| TimeSpan | retryPeriod | ||
| ) |
Definition at line 155 of file IndexedCachedList.cs.
|
set |
Definition at line 99 of file IndexedCachedList.cs.
|
setprotected |
Definition at line 41 of file IndexedCachedList.cs.
|
get |
Definition at line 126 of file IndexedCachedList.cs.