private synchronized void emitRecords ( ) throws IOException { for ( String recordName : bufferedData . keySet ( ) ) { RecordMap recordMap = bufferedData . get ( recordName ) ; synchronized ( recordMap ) { Set < Entry < TagMap , MetricMap > > entrySet = recordMap . entrySet ( ) ; for ( Entry < TagMap , MetricMap > entry : entrySet ) { OutputRecord outRec = new OutputRecord ( entry . getKey ( ) , entry . getValue ( ) ) ; emitRecord ( contextName , recordName , outRec ) ; } } } flush ( ) ; }
Emits the records .