boolean success ( T result ) { State < T > oldState ; synchronized ( mutex ) { if ( state . isCompleted ( ) ) { return false ; } oldState = state ; state = state . getSuccessState ( result ) ; } oldState . callSuccessCallbacks ( result ) ; return true ; }
To be called to set the result value .