Class JITOptimizedCache<K,​V>

  • All Implemented Interfaces:
    Cache<K,​V>

    public final class JITOptimizedCache<K,​V>
    extends OptimizedCacheBase<K,​V>
    JIT-optimized cache implementation focused on hot path performance. Key optimizations: - Method inlining hints via small methods - Monomorphic call sites - Branch prediction optimization - Minimal object allocation in hot paths - Cache-friendly data structures
    • Constructor Detail

      • JITOptimizedCache

        public JITOptimizedCache​(CacheConfig<K,​V> config)
    • Method Detail

      • doGet

        protected V doGet​(K key)
        Override to use JIT-optimized read path.
        Overrides:
        doGet in class OptimizedCacheBase<K,​V>
        Parameters:
        key - the key (already validated)
        Returns:
        the value or null if not found/expired
      • doPut

        protected void doPut​(K key,
                             V value)
        Override to use JIT-optimized write path.
        Overrides:
        doPut in class OptimizedCacheBase<K,​V>
        Parameters:
        key - the key (already validated)
        value - the value (already validated)
      • doRemove

        protected V doRemove​(K key)
        Override to use JIT-optimized remove path.
        Overrides:
        doRemove in class ConcurrentCacheBase<K,​V>
        Parameters:
        key - the key (already validated)
        Returns:
        the removed value or null if not found
      • getJITMetrics

        public String getJITMetrics()
        Returns JIT-specific performance metrics.