ResultAction executeOperation ( ) { assert isControllingThread ( ) ; try { /** Execution has begun */ executing = true ; processStages ( ) ; if ( resultAction == ResultAction . KEEP ) { report ( MessageSeverity . INFO , ControllerLogger . ROOT_LOGGER . operationSucceeded ( ) ) ; } else { report ( MessageSeverity . INFO , ControllerLogger . ROOT_LOGGER . operationRollingBack ( ) ) ; } } catch ( RuntimeException e ) { handleUncaughtException ( e ) ; ControllerLogger . MGMT_OP_LOGGER . unexpectedOperationExecutionException ( e , controllerOperations ) ; } finally { // On failure close any attached response streams if ( resultAction != ResultAction . KEEP && ! isBooting ( ) ) { synchronized ( this ) { if ( responseStreams != null ) { int i = 0 ; for ( OperationResponse . StreamEntry is : responseStreams . values ( ) ) { try { is . getStream ( ) . close ( ) ; } catch ( Exception e ) { ControllerLogger . MGMT_OP_LOGGER . debugf ( e , "Failed closing stream at index %d" , i ) ; } i ++ ; } responseStreams . clear ( ) ; } } } } return resultAction ; }
Package - protected method used to initiate operation execution .