public void initialize ( Map < String , String > params ) throws WPBIOException { try { memcacheClient = new WPBMemCacheClient ( ) ; String address = "" ; if ( params != null && params . get ( CONFIG_MEMCACHE_SERVERS ) != null ) { address = params . get ( CONFIG_MEMCACHE_SERVERS ) ; } memcacheClient . initialize ( address ) ; if ( params . get ( CONFIG_MEMCACHE_CHECK_INTERVAL ) != null ) { try { sleepTime = Integer . valueOf ( params . get ( CONFIG_MEMCACHE_CHECK_INTERVAL ) ) ; } catch ( NumberFormatException e ) { // do nothing, rely on default value } } WPBMemCacheSyncRunnable syncRunnable = new WPBMemCacheSyncRunnable ( this , memcacheClient , sleepTime ) ; ( new Thread ( syncRunnable ) ) . start ( ) ; } catch ( IOException e ) { throw new WPBIOException ( "cannot create memcache client" , e ) ; } }
default sleep time is 10 seconds