51Degrees Pipeline for Java

fiftyone.caching.LoadingCache< K, V > Interface Template Reference

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 >:

[legend]

Collaboration diagram for fiftyone.caching.LoadingCache< K, V >:

[legend]

Public Member Functions

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 >

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
keythe key of the value to load
loaderthe loader to use when getting the value
Returns
the value from the cache, or loader if not available
Exceptions
IOExceptionif there was an error from the loader

Implemented in fiftyone.caching.LruLoadingCache< K, V >.