Class EhCacheCompactor

  • All Implemented Interfaces:
    CacheCompactor, Runnable

    @Internal
    @ParametersAreNonnullByDefault
    public class EhCacheCompactor
    extends CacheCompactorSupport
    Handles the process of compacting EHCache caches by forcing eviction of expired elements. This is potentially expensive, so shouldn't be done willy-nilly, but only on a controlled schedule.
    Since:
    5.7
    • Field Detail

      • STATS_COMPACTION_ENABLED

        public static final boolean STATS_COMPACTION_ENABLED
    • Method Detail

      • compact

        public void compact()
        Description copied from interface: CacheCompactor
        Perform the compaction
      • flushStats

        public static void flushStats​(net.sf.ehcache.statistics.extended.ExtendedStatistics extendedStatistics,
                                      String statsName)