Class PolicyCache

    • Constructor Detail

      • PolicyCache

        public PolicyCache()
      • PolicyCache

        public PolicyCache​(java.util.function.Supplier<java.time.Instant> instantSupplier,
                           String cachePath,
                           @Nullable
                           java.time.Duration maxCacheAge)
    • Method Detail

      • isValid

        public boolean isValid()
        Specified by:
        isValid in interface IPolicyCache
        Returns:
        whether the cache is valid
      • validate

        public void validate()
        Description copied from interface: IPolicyCache
        refreshes validation time of the cache without changing its contents
        Specified by:
        validate in interface IPolicyCache
      • updateCache

        public boolean updateCache​(Set<Policy> policies)
        Description copied from interface: IPolicyCache
        updates cache content and refreshes validation time
        Specified by:
        updateCache in interface IPolicyCache
        Returns:
        whether updating the cache succeeded