Open kaixinbaba opened 2 years ago
When I use CAS API
void compareAndSet(ByteString key, Optional<ByteString> prevValue, ByteString value); void compareAndSet(ByteString key, Optional<ByteString> prevValue, ByteString value, long ttl);
How do I know the CAS's operation success?
Shouldn't these two APIs return boolean instead of void? Just like:
boolean
void
boolean compareAndSet(ByteString key, Optional<ByteString> prevValue, ByteString value); boolean compareAndSet(ByteString key, Optional<ByteString> prevValue, ByteString value, long ttl);
Please explain my doubts~😭
If the CAS operation encounters a conflict, a type of RawCASConflictException exception will raise.
RawCASConflictException
This issue is stale because it has been open 30 days with no activity.
Question
When I use CAS API
How do I know the CAS's operation success?
Shouldn't these two APIs return
boolean
instead ofvoid
? Just like:Please explain my doubts~😭