EntryExistsException (Apache Geode 1.12.3)
Date: 2021-06-11

org.apache.geode.cache

## Class EntryExistsException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.geode.GemFireException
        - - org.apache.geode.cache.CacheException
          - - org.apache.geode.cache.EntryExistsException

- All Implemented Interfaces:
    Serializable

      public class EntryExistsException
      extends CacheException

  Thrown when attempting to create a `Region.Entry` that already exists in the `Region`.
  Since:
    GemFire 3.0
  See Also:
    `Region.create(Object, Object)`, `Region.Entry`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntryExistsException(String msg, Object oldValue)` Constructs an instance of `EntryExistsException` with the specified detail message.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getOldValue()` Returns the old existing value that caused this exception.
    `void` | `setOldValue(Object oldValue)` Sets the old existing value that caused this exception.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.geode.GemFireException

      `getRootCause`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### EntryExistsException

          public EntryExistsException(String msg,
                                      Object oldValue)

      Constructs an instance of `EntryExistsException` with the specified detail message.
      Parameters:
        `msg` - the detail message
      Since:
        GemFire 6.5

  - ### Method Detail

    - #### getOldValue

          public Object getOldValue()

      Returns the old existing value that caused this exception.

    - #### setOldValue

          public void setOldValue(Object oldValue)

      Sets the old existing value that caused this exception.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `CacheException`