public void start ( ) { if ( hasRedissonInstance ) { redisson = Redisson . create ( config ) ; } retrieveAddresses ( ) ; if ( config . getRedissonNodeInitializer ( ) != null ) { config . getRedissonNodeInitializer ( ) . onStartup ( this ) ; } int mapReduceWorkers = config . getMapReduceWorkers ( ) ; if ( mapReduceWorkers != - 1 ) { if ( mapReduceWorkers == 0 ) { mapReduceWorkers = Runtime . getRuntime ( ) . availableProcessors ( ) ; } redisson . getExecutorService ( RExecutorService . MAPREDUCE_NAME ) . registerWorkers ( mapReduceWorkers ) ; log . info ( "{} map reduce worker(s) registered" , mapReduceWorkers ) ; } for ( Entry < String , Integer > entry : config . getExecutorServiceWorkers ( ) . entrySet ( ) ) { String name = entry . getKey ( ) ; int workers = entry . getValue ( ) ; redisson . getExecutorService ( name ) . registerWorkers ( workers ) ; log . info ( "{} worker(s) for '{}' ExecutorService registered" , workers , name ) ; } log . info ( "Redisson node started!" ) ; }
Start Redisson node instance