org.dellroad.stuff.pobj
Class PersistentObjectVersionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.dellroad.stuff.pobj.PersistentObjectException
                  extended by org.dellroad.stuff.pobj.PersistentObjectVersionException
All Implemented Interfaces:
Serializable

public class PersistentObjectVersionException
extends PersistentObjectException

Optimistic locking exception thrown by PersistentObject.setRoot() when the expected version number does not agree.

See Also:
Serialized Form

Constructor Summary
PersistentObjectVersionException(long actualVersion, long expectedVersion)
           
 
Method Summary
 long getActualVersion()
          Get the actual, unexpected version number.
 long getExpectedVersion()
          Get the version number that was expected.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentObjectVersionException

public PersistentObjectVersionException(long actualVersion,
                                        long expectedVersion)
Method Detail

getActualVersion

public long getActualVersion()
Get the actual, unexpected version number.


getExpectedVersion

public long getExpectedVersion()
Get the version number that was expected.