Two common problems that arise in registering multiple measurements that obtain their values from an external component or resource are access cost and value integrity. To allow amortization of a single (possibly expensive) access across multiple related measurement samplings a Group interface is available in the Metrics Open API containing just a single method, prepare, that will be invoked before any associated measurements are sampled in a collection cycle.

....

How and when collections are performed is left to the underlying implementation of the Metrics SPI though it is expected that most implementations will use one or more polling threads to perform a single sample collection cycle across all registered metrics at fixed intervals with the contractual constraint that all Group instances have their prepare method invoked once in a cycle before their associated measurements are sampled.

http://www.jinspired.com/site/how-not-to-design-a-metrics-api-part-3-groups-collections-samples