Class CacheRevalidatorBase

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    DefaultAsyncCacheRevalidator, DefaultCacheRevalidator

    class CacheRevalidatorBase
    extends java.lang.Object
    implements java.io.Closeable
    Abstract cache re-validation class.
    • Field Detail

      • lock

        private final java.util.concurrent.locks.ReentrantLock lock
      • pendingRequest

        private final java.util.Set<java.lang.String> pendingRequest
      • LOG

        private static final org.slf4j.Logger LOG
    • Method Detail

      • scheduleRevalidation

        void scheduleRevalidation​(java.lang.String cacheKey,
                                  java.lang.Runnable command)
        Schedules an asynchronous re-validation
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • awaitTermination

        public void awaitTermination​(org.apache.hc.core5.util.Timeout timeout)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • jobSuccessful

        void jobSuccessful​(java.lang.String identifier)
      • jobFailed

        void jobFailed​(java.lang.String identifier)
      • getScheduledIdentifiers

        java.util.Set<java.lang.String> getScheduledIdentifiers()