protected void set ( V v ) { if ( U . compareAndSwapInt ( this , STATE , NEW , COMPLETING ) ) { outcome = v ; U . putOrderedInt ( this , STATE , NORMAL ) ; // final state finishCompletion ( ) ; } }
Sets the result of this future to the given value unless this future has already been set or has been cancelled .