Class CacheStatisticCollector


  • public class CacheStatisticCollector
    extends Object
    Collects and maintains all the statistics for a cache.
    Since:
    6.0
    Author:
    Roberto Palmieri, Sebastiano Peluso, Diego Didona, Pedro Ruivo
    • Constructor Detail

      • CacheStatisticCollector

        public CacheStatisticCollector​(TimeService timeService)
    • Method Detail

      • reset

        public final void reset()
        reset all the statistics collected so far.
      • merge

        public final void merge​(TransactionStatistics transactionStatistics)
        Merges a transaction statistics in this cache statistics.
      • addLocalValue

        public final void addLocalValue​(ExtendedStatistic stat,
                                        double value)
        Adds a value to a local statistic. This value is not associated with any transaction.
      • addRemoteValue

        public final void addRemoteValue​(ExtendedStatistic stat,
                                         double value)
        Adds a value to a remote statistic. This value is not associated with any transaction.
      • dumpTo

        public final void dumpTo​(PrintWriter writer)
        Prints the cache statistics values to a PrintStream.
      • convertNanosToMicro

        public static double convertNanosToMicro​(double nanos)
        Returns:
        the conversion of nanoseconds to microseconds without losing precision.
      • convertNanosToSeconds

        public static double convertNanosToSeconds​(double nanos)
        Returns:
        the conversion of nanoseconds to seconds without losing precision.