Detailed Description
Extension of general cache contract to provide for getting a value with a particular value loaded.
Primarily used to allow the value loader to be an already instantiated value of the type V to avoid construction costs of that value. (In other words the loader has the signature "extends V implements IValueLoader").
Inheritance diagram for fiftyone.caching.LoadingCache< K, V >:
Collaboration diagram for fiftyone.caching.LoadingCache< K, V >:
Public Member Functions | |
| V | get (K key, ValueLoader< K, V > loader) throws IOException |
| Get the value using the specified key and calling the specified loader if needed. | |
Public Member Functions inherited from fiftyone.caching.Cache< K, V > | |
| V | get (K key) |
| Retrieves the value for key requested. | |
Member Function Documentation
◆ get()
| V fiftyone.caching.LoadingCache< K, V >.get | ( | K | key, |
| ValueLoader< K, V > | loader ) throws IOException |
Get the value using the specified key and calling the specified loader if needed.
- Parameters
-
key the key of the value to load loader the loader to use when getting the value
- Returns
- the value from the cache, or loader if not available
- Exceptions
-
IOException if there was an error from the loader
Implemented in fiftyone.caching.LruLoadingCache< K, V >.
