public synchronized static final IntervalLoggerController getControllerInstance ( ) { IntervalLoggerController ic = null ; // If no controller, create a bew instance. if ( instance == null ) { instance = new DefaultIntervalLoggerController ( ) ; ic = new IntervalLoggerControllerWrapper ( instance ) ; } else { // If background logged stopped then return a new runnable thread. An // edge case since once a background thread is started it will likely // run until the application exits. if ( ! instance . isRunning ( ) ) { instance = new DefaultIntervalLoggerController ( ) ; ic = new IntervalLoggerControllerWrapper ( instance ) ; } } return ic ; }
Return a single instance of the IntervalLoggerController .