public class OptimisticLockException extends PersistException
Repository
is using
optimistic locking for concurrency control, and lock aquisition failed.
This exception may also be thrown if multiversion concurrency control (MVCC)
is being used and the commit fails.Constructor and Description |
---|
OptimisticLockException() |
OptimisticLockException(long expectedVersion) |
OptimisticLockException(java.lang.Object expectedVersion) |
OptimisticLockException(java.lang.Object expectedVersion,
java.lang.Object savedVersion) |
OptimisticLockException(java.lang.Object expectedVersion,
java.lang.Object savedVersion,
Storable s) |
OptimisticLockException(java.lang.Object savedVersion,
Storable s,
java.lang.Object newVersion)
Construct exception for when new version was expected to have increased.
|
OptimisticLockException(java.lang.String message) |
OptimisticLockException(java.lang.String message,
java.lang.Throwable cause) |
OptimisticLockException(java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
Storable |
getStorable()
Returns the Storable which was acted upon, or null if not available.
|
backoff, getRootCause, makeFetchException, makePersistException, toFetchException, toFetchException, toPersistException, toPersistException
public OptimisticLockException()
public OptimisticLockException(java.lang.String message)
public OptimisticLockException(java.lang.String message, java.lang.Throwable cause)
public OptimisticLockException(java.lang.Throwable cause)
public OptimisticLockException(long expectedVersion)
expectedVersion
- version number that was expected for persistent
record when update was executedpublic OptimisticLockException(java.lang.Object expectedVersion)
expectedVersion
- version number that was expected for persistent
record when update was executedpublic OptimisticLockException(java.lang.Object expectedVersion, java.lang.Object savedVersion)
expectedVersion
- version number that was expected for persistent
record when update was executedsavedVersion
- actual persistent version number of storablepublic OptimisticLockException(java.lang.Object expectedVersion, java.lang.Object savedVersion, Storable s)
expectedVersion
- version number that was expected for persistent
record when update was executedsavedVersion
- actual persistent version number of storables
- Storable which was acted uponpublic OptimisticLockException(java.lang.Object savedVersion, Storable s, java.lang.Object newVersion)
savedVersion
- actual persistent version number of storables
- Storable which was acted uponnewVersion
- new version which was providedpublic Storable getStorable()
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.