Class MappingPlanCache

java.lang.Object
org.litebridge.orm.persistence.MappingPlanCache

public final class MappingPlanCache extends Object
Thread-safe cache for storing compiled DTO DtoMapper.MappingPlan instances.
  • Constructor Details

    • MappingPlanCache

      public MappingPlanCache()
  • Method Details

    • get

      public @Nullable DtoMapper.MappingPlan get(MappingPlanKey key)
      Retrieves a cached mapping plan for the specified key.
      Parameters:
      key - the mapping plan cache key
      Returns:
      the cached mapping plan, or null if not found
    • put

      public void put(MappingPlanKey key, DtoMapper.MappingPlan plan)
      Stores a mapping plan in the cache.
      Parameters:
      key - the mapping plan cache key
      plan - 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