com.gisgraphy.service

## Interface IStatsUsageService

- All Known Implementing Classes:
    StatsUsageServiceImpl

      public interface IStatsUsageService

  Manage The `StatsUsage`
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FLUSH_THRESHOLD` The satsUsage will be flush into the database every ...

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `flush(StatsUsageType statsUsageType)`
    `int` | `getNumberOfCounter()`
    `Long` | `getUsage(StatsUsageType statsUsageType)`
    `void` | `increaseUsage(StatsUsageType statsUsageType)`
    `void` | `resetUsage(StatsUsageType statsUsageType)`

- - ### Field Detail

    - #### FLUSH_THRESHOLD

          static final int FLUSH_THRESHOLD

      The satsUsage will be flush into the database every ... It is recommended to increase this value to a higher value to improve performances. if the server is stopped, you can loose FLUSH_THRESHOLD usage at most because the value won't be persist in the datastore
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getNumberOfCounter

          int getNumberOfCounter()

      Returns:
        the number of counter that are managed

    - #### getUsage

          Long getUsage(StatsUsageType statsUsageType)

      Parameters:
        `statsUsageType` - the usagetype
      Returns:
        the Usage for the specified `StatsUsageType`

    - #### increaseUsage

          void increaseUsage(StatsUsageType statsUsageType)

      Parameters:
        `statsUsageType` - the `StatsUsageType` counter to increase Increase the counter of the specified type

    - #### resetUsage

          void resetUsage(StatsUsageType statsUsageType)

      Parameters:
        `statsUsageType` - the `StatsUsageType` to reset reset the stats for the specified `StatsUsageType`

    - #### flush

          void flush(StatsUsageType statsUsageType)

      Parameters:
        `statsUsageType` - the `StatsUsageType` to flush flush the value into database

Copyright © 2015. All rights reserved.