com.amazon.carbonado
Class OptimisticLockException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.amazon.carbonado.RepositoryException
com.amazon.carbonado.PersistException
com.amazon.carbonado.OptimisticLockException
- All Implemented Interfaces:
- Serializable
public class OptimisticLockException
- extends PersistException
An OptimisticLockException is thrown if the 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.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
|
Method Summary |
Storable |
getStorable()
Returns the Storable which was acted upon, or null if not available. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
OptimisticLockException
public OptimisticLockException()
OptimisticLockException
public OptimisticLockException(String message)
OptimisticLockException
public OptimisticLockException(String message,
Throwable cause)
OptimisticLockException
public OptimisticLockException(Throwable cause)
OptimisticLockException
public OptimisticLockException(long expectedVersion)
- Parameters:
expectedVersion - version number that was expected for persistent
record when update was executed
OptimisticLockException
public OptimisticLockException(Object expectedVersion)
- Parameters:
expectedVersion - version number that was expected for persistent
record when update was executed
OptimisticLockException
public OptimisticLockException(Object expectedVersion,
Object savedVersion)
- Parameters:
expectedVersion - version number that was expected for persistent
record when update was executedsavedVersion - actual persistent version number of storable
OptimisticLockException
public OptimisticLockException(Object expectedVersion,
Object savedVersion,
Storable s)
- Parameters:
expectedVersion - version number that was expected for persistent
record when update was executedsavedVersion - actual persistent version number of storables - Storable which was acted upon
OptimisticLockException
public OptimisticLockException(Object savedVersion,
Storable s,
Object newVersion)
- Construct exception for when new version was expected to have increased.
- Parameters:
savedVersion - actual persistent version number of storables - Storable which was acted uponnewVersion - new version which was provided- Since:
- 1.2
getStorable
public Storable getStorable()
- Returns the Storable which was acted upon, or null if not available.
Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.