Class AbstractTimeSnapshot

    • Constructor Detail

      • AbstractTimeSnapshot

        protected AbstractTimeSnapshot​(long timeInterval,
                                       TimeUnit timeIntervalUnit)
        Constructor to be used by subclasses overriding the base abstract uniform time snapshot class.
        Parameters:
        timeInterval - The time interval of this snapshot.
        timeIntervalUnit - The time interval unit.
    • Method Detail

      • getTimeInterval

        public long getTimeInterval​(TimeUnit timeUnit)
        Description copied from interface: UniformTimeSnapshot
        The time interval for which this snapshot was created.
        Specified by:
        getTimeInterval in interface UniformTimeSnapshot
        Parameters:
        timeUnit - The time unit in which to return the time interval.
        Returns:
        The time interval the snapshot was created at for the given time unit.
      • getRate

        public double getRate​(TimeUnit timeUnit)
        Description copied from interface: UniformTimeSnapshot
        The rate of values in this snapshot for one given time unit.
        Specified by:
        getRate in interface UniformTimeSnapshot
        Parameters:
        timeUnit - The time unit at which to get the rate
        Returns:
        The rate