@ Override public void update ( ) { synchronized ( this ) { long currentTime = System . currentTimeMillis ( ) ; if ( currentTime - lastUpdateTime > updateInterval ) { lastUpdateTime = currentTime ; fetchMetrics ( ) ; } } }
This method can be used to signal this MetricFetcher that the metrics are still in use and should be updated .