java.lang.Object
org.litebridge.orm.persistence.MappingPlanCache
Thread-safe cache for storing compiled DTO
DtoMapper.MappingPlan instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncache()Returns the underlying cache map.voidclear()Clears the cache.@Nullable DtoMapper.MappingPlanget(MappingPlanKey key) Retrieves a cached mapping plan for the specified key.voidput(MappingPlanKey key, DtoMapper.MappingPlan plan) Stores a mapping plan in the cache.intsize()Returns the current cache size.
-
Constructor Details
-
MappingPlanCache
public MappingPlanCache()
-
-
Method Details
-
get
Retrieves a cached mapping plan for the specified key.- Parameters:
key- the mapping plan cache key- Returns:
- the cached mapping plan, or
nullif not found
-
put
Stores a mapping plan in the cache.- Parameters:
key- the mapping plan cache keyplan- the mapping plan to cache
-
size
public int size()Returns the current cache size.- Returns:
- the number of cached mapping plans
-
clear
public void clear()Clears the cache. -
cache
Returns the underlying cache map.- Returns:
- the underlying cache map
-