boolean function ( T arg0 , Predicate < T > arg1 ) { checkState ( ! Thread . holdsLock ( this ) , "srini_string" ) ; while ( true ) { T loc0 = get ( ) ; if ( ! arg1 . apply ( loc0 ) ) { return false ; } if ( compareAndSet ( loc0 , arg0 ) ) { return true ; } } }
sets the state if the current state satisfies the specified predicate . if the new state does not . equals the current state , listeners and waiters will be notified . concode_field_sep Executor executor concode_elem_sep Logger log concode_elem_sep String name concode_elem_sep List<StateChangeListener<T>> stateChangeListeners concode_elem_sep T state concode_elem_sep List<SettableFuture<T>> futureStateChanges concode_field_sep T set concode_elem_sep void addStateChangeListener concode_elem_sep boolean compareAndSet concode_elem_sep void fireStateChanged concode_elem_sep T get concode_elem_sep ListenableFuture<T> getStateChange concode_elem_sep String toString concode_elem_sep void stateChanged concode_elem_sep Duration waitForStateChange