MCPcopy Index your code
hub / github.com/OpenTSDB/async / casState

Method casState

src/Deferred.java:576–578  ·  view source on GitHub ↗

Atomically compares and swaps the state of this Deferred. @param cmp The expected state to compare against. @param val The new state to transition to if the comparison is successful. @return true if the CAS succeeded, false otherwise.

(final int cmp, final int val)

Source from the content-addressed store, hash-verified

574 * @return {@code true} if the CAS succeeded, {@code false} otherwise.
575 */
576 private boolean casState(final int cmp, final int val) {
577 return stateUpdater.compareAndSet(this, cmp, val);
578 }
579
580 /** Constructor. */
581 public Deferred() {

Callers 3

callbackMethod · 0.95
handleContinuationMethod · 0.80
callMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected