public synchronized RequestsTracker snapshot ( boolean reset ) { long t = executing . getCount ( ) ; long r = rejected . getCount ( ) ; long f = failed . getCount ( ) ; TimeCounter c = counter . snapshot ( reset ) ; IntervalHistogram h = histogram . snapshot ( reset ) ; if ( reset ) { executing . reset ( ) ; rejected . reset ( ) ; failed . reset ( ) ; succeeded . reset ( ) ; } return new RequestsTracker ( t , r , f , c , h , lastFailureReason , lastRejectReason ) ; }
Clones this tracker and zeroizes out it afterwards if the reset is true .