Package org.dellroad.stuff.pobj
Class PersistentObjectVersionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.dellroad.stuff.pobj.PersistentObjectException
org.dellroad.stuff.pobj.PersistentObjectVersionException
- All Implemented Interfaces:
Serializable
Optimistic locking exception thrown by
PersistentObject.setRoot()
when the expected version number does not agree.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get the actual, unexpected version number.long
Get the version number that was expected.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PersistentObjectVersionException
public PersistentObjectVersionException(long actualVersion, long expectedVersion)
-
-
Method Details
-
getActualVersion
public long getActualVersion()Get the actual, unexpected version number.- Returns:
- actual version number
-
getExpectedVersion
public long getExpectedVersion()Get the version number that was expected.- Returns:
- expected version number
-