public void start(CockroachQueue queue) {
        if(!started){
            logger.info("starting...");
            config.print();
            try {
                this.executerManager.bindListener(BootstrapExecutersListener.class).bindListener(this.config.getExecutersListener()).start(queue);
            } catch (Exception e) {
                logger.info("start faild");
                logger.debug(e.getMessage());
                e.printStackTrace();
            }
            this.started = true;
            logger.info("start success");
        }else{
            logger.warn("the cockroach has already started");
        }
    }
public void start ( CockroachQueue queue ) { if ( ! started ) { logger . info ( "starting..." ) ; config . print ( ) ; try { this . executerManager . bindListener ( BootstrapExecutersListener . class ) . bindListener ( this . config . getExecutersListener ( ) ) . start ( queue ) ; } catch ( Exception e ) { logger . info ( "start faild" ) ; logger . debug ( e . getMessage ( ) ) ; e . printStackTrace ( ) ; } this . started = true ; logger . info ( "start success" ) ; } else { logger . warn ( "the cockroach has already started" ) ; } }
启动爬虫程序
只能启动一次，启动之前先判断之前有没有启动过
@param queue
@throws IllegalAccessException
@throws InstantiationException