int getAveMapSlotRefillMsecs ( ) { synchronized ( mapSlotRefillMsecsQueue ) { if ( mapSlotRefillMsecsQueue . isEmpty ( ) ) { return - 1 ; } int totalMapSlotRefillMsecs = 0 ; for ( int refillMsecs : mapSlotRefillMsecsQueue ) { totalMapSlotRefillMsecs += refillMsecs ; } return totalMapSlotRefillMsecs / mapSlotRefillMsecsQueue . size ( ) ; } }
Get the average time in milliseconds to refill a free map slot . This average is calculated on a rotating buffer .