public ActiveStats snapshot ( ) { ActiveStats snapshot = new ActiveStats ( ) . setStartTime ( getStartTime ( ) ) . setDataCollectorVersion ( getDataCollectorVersion ( ) ) . setDpmEnabled ( isDpmEnabled ( ) ) . setUpTime ( getUpTime ( ) . snapshot ( ) ) . setRecordCount ( getRecordCount ( ) ) ; snapshot . setPipelines ( getPipelines ( ) . stream ( ) . map ( UsageTimer :: snapshot ) . collect ( Collectors . toList ( ) ) ) ; snapshot . setStages ( getStages ( ) . stream ( ) . map ( UsageTimer :: snapshot ) . collect ( Collectors . toList ( ) ) ) ; return snapshot ; }
returns a snapshot for persistency