Class FunctionLogLevelCache

java.lang.Object
pl.decerto.hyperon.runtime.function.log.FunctionLogLevelCache

public class FunctionLogLevelCache extends Object
  • Field Details

    • DEFAULT_TTL

      public static final Duration DEFAULT_TTL
  • Constructor Details

    • FunctionLogLevelCache

      public FunctionLogLevelCache(Duration ttl, Clock clock)
    • FunctionLogLevelCache

      public FunctionLogLevelCache(Duration ttl)
    • FunctionLogLevelCache

      public FunctionLogLevelCache()
  • Method Details

    • get

      public FunctionLogLevel get(String code)
      Gets cached value from function with provided [code]. Returns null if more than [ttl] milliseconds have passed since cache entry creation.
    • put

      public void put(String code, FunctionLogLevel logLevel)
      The provided [logLevel] is cached for function with provided [code]. The cache entry holds the current timestamp taken from [clock]. After [ttl] milliseconds this entry will be invalidated.
    • toString

      public String toString()
      Overrides:
      toString in class Object