KeyChangedException
Date: 2016-02-29

de.zib.scalaris

## Class KeyChangedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.ericsson.otp.erlang.OtpException
      - - com.ericsson.otp.erlang.OtpErlangException
        - - 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

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ErlangValue` | `getOldValue()` Returns the (old) value stored in scalaris.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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