private void stopWriterAndClearMasterServerList ( ) { for ( Server server : this . masterServersList ) { for ( OutputWriter writer : server . getOutputWriters ( ) ) { try { writer . close ( ) ; } catch ( LifecycleException ex ) { log . error ( "Eror stopping writer: {}" , writer ) ; } } for ( Query query : server . getQueries ( ) ) { for ( OutputWriter writer : query . getOutputWriterInstances ( ) ) { try { writer . close ( ) ; log . debug ( "Stopped writer: {} for query: {}" , writer , query ) ; } catch ( LifecycleException ex ) { log . error ( "Error stopping writer: {} for query: {}" , writer , query , ex ) ; } } } } this . masterServersList = ImmutableList . of ( ) ; }
Shut down the output writers and clear the master server list Used both during shutdown and when re - reading config files