CacheExistsException (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache, class: CacheExistsException

Package 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
  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

  Modifier and Type
  Method
  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 Details

  - ### CacheExistsException

    public CacheExistsException()

  - ### CacheExistsException

    public CacheExistsException(Cache cache, String msg)
    Constructs an instance of `CacheExistsException` with the specified detail message.
    Parameters:
      `cache` - the `Cache` that already exists
      `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:
      `cache` - the `Cache` that already exists
      `msg` - the detail message
      `cause` - the causal Throwable

- ## Method Details

  - ### getCache

    public Cache getCache()
    Returns the `Cache` that already exists.
    Returns:
      the `Cache` that already exists
    Since:
      GemFire 4.0