Class CacheMetrics

    • Field Detail

      • registry

        protected io.dropwizard.metrics5.MetricRegistry registry
      • read

        protected io.dropwizard.metrics5.Counter read
      • read_hit

        protected io.dropwizard.metrics5.Counter read_hit
      • read_miss

        protected io.dropwizard.metrics5.Counter read_miss
      • read_hit_ratio

        protected io.dropwizard.metrics5.RatioGauge read_hit_ratio
      • write

        protected io.dropwizard.metrics5.Counter write
      • invalidation

        protected io.dropwizard.metrics5.Counter invalidation
      • size

        protected io.dropwizard.metrics5.Gauge<Long> size
      • READ_HIT_NAME

        protected final io.dropwizard.metrics5.MetricName READ_HIT_NAME
      • READ_HIT_RATIO_NAME

        protected final io.dropwizard.metrics5.MetricName READ_HIT_RATIO_NAME
      • READ_MISS_NAME

        protected final io.dropwizard.metrics5.MetricName READ_MISS_NAME
      • READ_NAME

        protected final io.dropwizard.metrics5.MetricName READ_NAME
      • WRITE_NAME

        protected final io.dropwizard.metrics5.MetricName WRITE_NAME
      • INVALIDATE_ALL_NAME

        protected final io.dropwizard.metrics5.MetricName INVALIDATE_ALL_NAME
      • SIZE_NAME

        protected final io.dropwizard.metrics5.MetricName SIZE_NAME
    • Method Detail

      • nameOf

        protected io.dropwizard.metrics5.MetricName nameOf​(String name)
      • get

        public Serializable get​(String key)
        Description copied from interface: Cache
        Get method to retrieve value from cache Must not raise exception if the key is null, but return null
        Specified by:
        get in interface Cache
        Overrides:
        get in class CacheWrapper
        Parameters:
        key - the string key
        Returns:
        the Serializable value, return null if the key does not exist or if the key is null
      • put

        public void put​(String key,
                        Serializable value)
        Description copied from interface: Cache
        Put method to store a Serializable value
        Specified by:
        put in interface Cache
        Overrides:
        put in class CacheWrapper
        Parameters:
        key - the string key, if null, the value will not be stored
        value - the value to store, if null, the value will not be stored