com.h3c.sdn.metric

## Class MetricRegistry.PersistTimes

- java.lang.Object
- - com.h3c.sdn.metric.MetricRegistry.PersistTimes

- Enclosing class:
    MetricRegistry

      public static class MetricRegistry.PersistTimes
      extends Object

  Utility class that holds two time stamps that should correspond to a single metric. One time indicates the last time the metric value was actually persisted and the other the next time an attempt should be made to persist the metric value.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `INITIAL` The initial time stamp value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetricRegistry.PersistTimes()` Default constructor, which sets both time stamps to a known initial value.
    `MetricRegistry.PersistTimes(long nextCheck)` Constructor that initializes the last persisted time stamp to a known initial value, and uses the specified value to initialize the next check time stamp.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getLastPersisted()` Gets the last persisted time stamp.
    `long` | `getNextCheck()` Gets the next check time stamp.
    `void` | `setLastPersisted(long toSet)` Sets the last persisted time stamp.
    `void` | `setNextCheck(long toSet)` Sets the next check time stamp.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INITIAL

          public static final long INITIAL

      The initial time stamp value.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MetricRegistry.PersistTimes

          public MetricRegistry.PersistTimes()

      Default constructor, which sets both time stamps to a known initial value.

    - #### MetricRegistry.PersistTimes

          public MetricRegistry.PersistTimes(long nextCheck)

      Constructor that initializes the last persisted time stamp to a known initial value, and uses the specified value to initialize the next check time stamp.
      Parameters:
        `nextCheck` - next time the metric should be persisted

  - ### Method Detail

    - #### getLastPersisted

          public long getLastPersisted()

      Gets the last persisted time stamp.
      Returns:
        last persisted time

    - #### getNextCheck

          public long getNextCheck()

      Gets the next check time stamp.
      Returns:
        next check time

    - #### setLastPersisted

          public void setLastPersisted(long toSet)

      Sets the last persisted time stamp.
      Parameters:
        `toSet` - time stamp

    - #### setNextCheck

          public void setNextCheck(long toSet)

      Sets the next check time stamp.
      Parameters:
        `toSet` - time stamp

Copyright © 2014. All Rights Reserved.