@ SuppressWarnings ( "fallthrough" ) private void rollup ( ) { DateTime now = timeFactory . create ( ) ; Window largest = null ; for ( DurationHistory history : durations . values ( ) ) { largest = history . rollup ( ) ; } for ( ValueHistory history : values . values ( ) ) { largest = history . rollup ( ) ; } if ( largest == null ) return ; // Note that we do expect to fall through, as the 'largest' represents the largest window that was changed, // while all smaller windows were also changed ... switch ( largest ) { case PREVIOUS_52_WEEKS : this . weeksStartTime . set ( now ) ; // fall through!! case PREVIOUS_7_DAYS : this . daysStartTime . set ( now ) ; // fall through!! case PREVIOUS_24_HOURS : this . hoursStartTime . set ( now ) ; // fall through!! case PREVIOUS_60_MINUTES : this . minutesStartTime . set ( now ) ; // fall through!! case PREVIOUS_60_SECONDS : this . secondsStartTime . set ( now ) ; } }
Method called once every second by the scheduled job .