Class JCacheStatisticsMXBean

    • Constructor Detail

      • JCacheStatisticsMXBean

        public JCacheStatisticsMXBean()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Returns if statistic collection is enabled.
      • enable

        public void enable​(boolean enabled)
        Sets whether the statistic collection is enabled.
        Parameters:
        enabled - whether to collect statistics
      • recordHits

        public void recordHits​(@org.checkerframework.checker.index.qual.NonNegative long count)
        Records cache hits. This should be called when a cache request returns a cached value.
        Parameters:
        count - the number of hits to record
      • recordMisses

        public void recordMisses​(@org.checkerframework.checker.index.qual.NonNegative long count)
        Records cache misses. This should be called when a cache request returns a value that was not found in the cache.
        Parameters:
        count - the number of misses to record
      • recordPuts

        public void recordPuts​(@org.checkerframework.checker.index.qual.NonNegative long count)
        Records cache insertion and updates.
        Parameters:
        count - the number of writes to record
      • recordRemovals

        public void recordRemovals​(@org.checkerframework.checker.index.qual.NonNegative long count)
        Records cache removals.
        Parameters:
        count - the number of removals to record
      • recordEvictions

        public void recordEvictions​(@org.checkerframework.checker.index.qual.NonNegative long count)
        Records cache evictions.
        Parameters:
        count - the number of evictions to record
      • recordGetTime

        public void recordGetTime​(long durationNanos)
        Records the time to execute get operations. This time does not include the time it takes to load an entry on a cache miss, as specified by the specification.
        Parameters:
        durationNanos - the amount of time in nanoseconds
      • recordPutTime

        public void recordPutTime​(long durationNanos)
        Records the time to execute put operations.
        Parameters:
        durationNanos - the amount of time in nanoseconds
      • recordRemoveTime

        public void recordRemoveTime​(long durationNanos)
        Records the time to execute remove operations.
        Parameters:
        durationNanos - the amount of time in nanoseconds