Interface MutableLong
- All Superinterfaces:
AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()default booleancompareAndSet(long expectedValue, long newValue) This is not meant to be atomic; it's semantically equivalent to:longget()voidset(long value)
-
Method Details
-
getMutableLongId
String getMutableLongId() -
get
- Throws:
UnavailableStateException
-
set
- Throws:
UnavailableStateException
-
compareAndSet
This is not meant to be atomic; it's semantically equivalent to:long oldValue = mutableLong.get(); if (mutableLong.oldValue != expectedValue) { return false; } mutableLong.set(newValue); return true;- Throws:
UnavailableStateException
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-