Class ConfigSourceCacheWrapper

java.lang.Object
com.alipay.sofa.common.config.source.AbstractConfigSource
com.alipay.sofa.common.config.source.ConfigSourceCacheWrapper
All Implemented Interfaces:
ConfigSource, Ordered

public class ConfigSourceCacheWrapper extends AbstractConfigSource
Version:
: CacheConfigSourceWrapper.java, v 0.1 2021年12月20日 8:19 下午 zhaowang
Author:
zhaowang
  • Field Details

  • Constructor Details

    • ConfigSourceCacheWrapper

      public ConfigSourceCacheWrapper(AbstractConfigSource delegate, com.google.common.cache.CacheBuilder<String,String> cb)
    • ConfigSourceCacheWrapper

      public ConfigSourceCacheWrapper(AbstractConfigSource delegate, long expireAfterSecond)
  • Method Details

    • getName

      public String getName()
      Returns:
      The name of ConfigSource
    • doGetConfig

      public String doGetConfig(String key)
      Specified by:
      doGetConfig in class AbstractConfigSource
    • hasKey

      public boolean hasKey(String key)
      Specified by:
      hasKey in class AbstractConfigSource
    • getOrder

      public int getOrder()
      Description copied from interface: Ordered
      Get the order value of this object.

      Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

      Same order values will result in arbitrary sort positions for the affected objects.

      Returns:
      the order value
      See Also: