private void handleCreate ( final NetworkContext context ) { log . debug ( String . format ( "%s - Network configuration created in cluster: %s" , NetworkManager . this , cluster . address ( ) ) ) ; log . debug ( String . format ( "%s - Scheduling network deployment task" , NetworkManager . this ) ) ; tasks . runTask ( new Handler < Task > ( ) { @ Override public void handle ( final Task task ) { currentContext = context ; // Any time the network is being reconfigured, unready the network. // This will cause components to pause during the reconfiguration. unready ( new Handler < AsyncResult < Void > > ( ) { @ Override public void handle ( AsyncResult < Void > result ) { if ( result . failed ( ) ) { log . error ( result . cause ( ) ) ; task . complete ( ) ; } else { deployNetwork ( context , new Handler < AsyncResult < NetworkContext > > ( ) { @ Override public void handle ( AsyncResult < NetworkContext > result ) { task . complete ( ) ; if ( result . failed ( ) ) { log . error ( result . cause ( ) ) ; } else { log . info ( String . format ( "%s - Successfully deployed network" , NetworkManager . this ) ) ; } } } ) ; } } } ) ; } } ) ; }
Handles the creation of the network .