long function ( AtomicLongFieldUpdater < T > arg0 , T arg1 , long arg2 ) { while ( true ) { long loc0 = arg0 . get ( arg1 ) ; long loc1 = addCap ( loc0 , arg2 ) ; if ( arg0 . compareAndSet ( arg1 , loc0 , loc1 ) ) { return loc0 ; } } }
adds n to requested field and returns the value prior toaddition once the addition is successful uses cas semantics . if overflows then sets requested field to long.max _ value . concode_field_sep PlaceHolder placeHolder concode_field_sep long multiplyCap concode_elem_sep long addCap