Class DefaultSchedulerProvider

  • All Implemented Interfaces:
    org.cache2k.config.CustomizationSupplier<org.cache2k.operation.Scheduler>

    public class DefaultSchedulerProvider
    extends Object
    implements org.cache2k.config.CustomizationSupplier<org.cache2k.operation.Scheduler>
    Provides scheduler instances for caches which are backed by a common ScheduledThreadPoolExecutor and two threads. The actual processing is done via the common ForkJoinPool to reach higher parallelism if many caches are active within a system.

    When all caches are closed, this will also stop the daemon threads. This is needed in case cache2k is used with separate classloaders.

    Author:
    Jens Wilke
    See Also:
    Scheduler
    • Method Detail

      • supply

        public org.cache2k.operation.Scheduler supply​(org.cache2k.config.CacheBuildContext<?,​?> buildContext)
        Specified by:
        supply in interface org.cache2k.config.CustomizationSupplier<org.cache2k.operation.Scheduler>