de.zib.scalaris
Class KeyChangedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ericsson.otp.erlang.OtpException
              extended by com.ericsson.otp.erlang.OtpErlangException
                  extended by de.zib.scalaris.KeyChangedException
All Implemented Interfaces:
Serializable

public class KeyChangedException
extends OtpErlangException

Exception that is thrown if a test_and_set operation on a scalaris ring fails because the old value did not match the expected value. Contains the old value stored in scalaris.

Since:
2.7
Version:
2.7
Author:
Nico Kruber, kruber@zib.de
See Also:
Serialized Form

Constructor Summary
KeyChangedException(ErlangValue old_value)
          Creates the exception with the given old value.
KeyChangedException(Throwable e, ErlangValue old_value)
          Creates the exception with the given old value taking the message of the given throwable.
 
Method Summary
 ErlangValue getOldValue()
          Returns the (old) value stored in scalaris.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyChangedException

public KeyChangedException(ErlangValue old_value)
Creates the exception with the given old value.

Parameters:
old_value - the old value stored in scalaris

KeyChangedException

public KeyChangedException(Throwable e,
                           ErlangValue old_value)
Creates the exception with the given old value taking the message of the given throwable.

Parameters:
e - the exception to "re-throw"
old_value - the old value stored in scalaris
Method Detail

getOldValue

public ErlangValue getOldValue()
Returns the (old) value stored in scalaris.

Returns:
the value