Class GreetingStatistics
java.lang.Object
org.gcube.service.helloworld.statistics.GreetingStatistics
- All Implemented Interfaces:
org.gcube.common.health.api.Statistics
An example of a group of public statistics of a service: SmartGears finds the class by its
annotation, computes it every
refresh() on a thread of its own and serves the last result,
with no token, at /smartgears/<service>/statistics. A real service computes here the
figures of its domain, aggregate numbers only, e.g. by querying its backend.- Author:
- Luca Frosini (ISTI-CNR)
-
Field Summary
Fields inherited from interface org.gcube.common.health.api.Statistics
DEFAULT_REFRESH -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GreetingStatistics
public GreetingStatistics()
-
-
Method Details
-
greeted
public static void greeted()Counts one greeting. -
id
- Specified by:
idin interfaceorg.gcube.common.health.api.Statistics
-
title
- Specified by:
titlein interfaceorg.gcube.common.health.api.Statistics
-
description
- Specified by:
descriptionin interfaceorg.gcube.common.health.api.Statistics
-
refresh
Computed again every five minutes instead of the default thirty: it costs nothing.- Specified by:
refreshin interfaceorg.gcube.common.health.api.Statistics
-
compute
- Specified by:
computein interfaceorg.gcube.common.health.api.Statistics
-