public synchronized SamplerResult < T > finishSampling ( int count ) { List < Counter < T >> results = Collections . EMPTY_LIST ; long cardinality = 0 ; if ( enabled ) { enabled = false ; results = summary . topK ( count ) ; cardinality = hll . cardinality ( ) ; } return new SamplerResult < T > ( results , cardinality ) ; }
Call to stop collecting samples and gather the results