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

org.apache.geode.cache

## Class CacheExistsException

- 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.CacheExistsException

- All Implemented Interfaces:
    Serializable

      public class CacheExistsException
      extends CacheException

  Thrown when attempting to create a `Cache` if one already exists.
  Since:
    GemFire 3.0
  See Also:
    `CacheFactory.create()`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheExistsException()`
    `CacheExistsException(Cache cache, String msg)` Constructs an instance of `CacheExistsException` with the specified detail message.
    `CacheExistsException(Cache cache, String msg, Throwable cause)` Constructs an instance of `CacheExistsException` with the specified detail message and cause.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Cache` | `getCache()` Returns the `Cache` that already exists.

    - ### Methods inherited from class org.apache.geode.cache.CacheException

      `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

    - #### CacheExistsException

          public CacheExistsException()

    - #### CacheExistsException

          public CacheExistsException(Cache cache,
                                      String msg)

      Constructs an instance of `CacheExistsException` with the specified detail message.
      Parameters:
        `msg` - the detail message

    - #### CacheExistsException

          public CacheExistsException(Cache cache,
                                      String msg,
                                      Throwable cause)

      Constructs an instance of `CacheExistsException` with the specified detail message and cause.
      Parameters:
        `msg` - the detail message
        `cause` - the causal Throwable

  - ### Method Detail

    - #### getCache

          public Cache getCache()

      Returns the `Cache` that already exists.
      Since:
        GemFire 4.0