51Degrees Pipeline Java  4.1

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>toavoidconstructioncostsofthatvalue.(Inotherwordstheloaderhasthesignature"extendsVimplementsIValueLoader").

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

[legend]

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

[legend]

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. More...

Public Member Functions inherited from fiftyone.caching.Cache< K, V >

V  get (K key)
Retrieves the value for key requested. More...

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