Package com.couchbase.client.core.error
Class CASMismatchException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.couchbase.client.core.error.CouchbaseException
-
- com.couchbase.client.core.error.CASMismatchException
-
- All Implemented Interfaces:
Serializable
public class CASMismatchException extends CouchbaseException
Indicates an optimistic locking failure.The operation failed because the specified compare and swap (CAS) value differs from the document's actual CAS value. This means the document was modified since the original CAS value was acquired.
The application should usually respond by fetching a fresh version of the document and repeating the failed operation.
- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CASMismatchException
forKey(String key)
String
key()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
forKey
public static CASMismatchException forKey(String key)
-
key
public String key()
-
-