Cache which can be used to cache and compute entities
Parameters
backingMap
the map which is used to cache the entities, defaults to a Hashmap
Type Parameters
K
the type of the keys under which cached entities are saved
V
the type of the cached entities
Properties
Functions
Link copied to clipboard
Gets the entity in cache under the specified key If no cache entry is found, the mappingFunction is used to create a new entity, which is saved to the cache and returned. Throws an exception if the entity under the provided key is currently computed
Gets the entity in cache under the specified key If no cache entry is found, the mappingFunction is used to create a new entity, which is saved to the cache and returned. If the value is currently computed, returns alternativeIfComputing
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard