protected synchronized void populateStatistics ( final boolean noCache ) { //check again before starting the work. if ( noCache || System . currentTimeMillis ( ) - lastRefreshedTime > cacheTimeInMilliseconds ) { final ExecutorInfo stats = new ExecutorInfo ( ) ; fillRemainingMemoryPercent ( stats ) ; fillRemainingFlowCapacityAndLastDispatchedTime ( stats ) ; fillCpuUsage ( stats ) ; cachedstats = stats ; lastRefreshedTime = System . currentTimeMillis ( ) ; } }
call the data providers to fill the returning data container for statistics data . This function refreshes the static cached copy of data in case if necessary .