public void run ( ) { for ( LocalGossipMember member : members . keySet ( ) ) { if ( member != me ) { member . startTimeoutTimer ( ) ; } } try { passiveGossipThread = passiveGossipThreadClass . getConstructor ( GossipManager . class ) . newInstance ( this ) ; gossipThreadExecutor . execute ( passiveGossipThread ) ; activeGossipThread = activeGossipThreadClass . getConstructor ( GossipManager . class ) . newInstance ( this ) ; gossipThreadExecutor . execute ( activeGossipThread ) ; } catch ( InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e1 ) { throw new RuntimeException ( e1 ) ; } GossipService . LOGGER . debug ( "The GossipService is started." ) ; while ( gossipServiceRunning . get ( ) ) { try { // TODO TimeUnit . MILLISECONDS . sleep ( 1 ) ; } catch ( InterruptedException e ) { GossipService . LOGGER . warn ( "The GossipClient was interrupted." ) ; } } }
Starts the client . Specifically start the various cycles for this protocol . Start the gossip thread and start the receiver thread .