protected void initConfig() {
        CollectorConfiguration config = configurationService.getCollector(null, null, null, null);

        if (config != null) {
            configLastUpdated = System.currentTimeMillis();

            filterManager = new FilterManager(config);
            try {
                processorManager = new ProcessorManager(config);
            } catch (Throwable t) {
                if (t != null) {
                    log.log(Level.SEVERE, "Failed to initialise Process Manager", t);
                }
            }

            initRefreshCycle();
        } else {
            // Wait for a period of time and try doing the initial config again
            Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
                public Thread newThread(Runnable r) {
                    Thread t = Executors.defaultThreadFactory().newThread(r);
                    t.setDaemon(true);
                    return t;
                }
            }).schedule(new Runnable() {
                @Override
                public void run() {
                    initConfig();
                }
            }, configRetryInterval, TimeUnit.SECONDS);
        }
    }
protected void initConfig ( ) { CollectorConfiguration config = configurationService . getCollector ( null , null , null , null ) ; if ( config != null ) { configLastUpdated = System . currentTimeMillis ( ) ; filterManager = new FilterManager ( config ) ; try { processorManager = new ProcessorManager ( config ) ; } catch ( Throwable t ) { if ( t != null ) { log . log ( Level . SEVERE , "Failed to initialise Process Manager" , t ) ; } } initRefreshCycle ( ) ; } else { Executors . newSingleThreadScheduledExecutor ( new ThreadFactory ( ) { public Thread newThread ( Runnable r ) { Thread t = Executors . defaultThreadFactory ( ) . newThread ( r ) ; t . setDaemon ( true ) ; return t ; } } ) . schedule ( new Runnable ( ) { @ Override public void run ( ) { initConfig ( ) ; } } , configRetryInterval , TimeUnit . SECONDS ) ; } }
This method initialises the configuration.