StateChangeException (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je.rep

## Class StateChangeException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.sleepycat.je.DatabaseException
        - - com.sleepycat.je.OperationFailureException
          - - com.sleepycat.je.rep.StateChangeException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    MasterStateException, ReplicaStateException, ReplicaWriteException, UnknownMasterException

      public abstract class StateChangeException
      extends OperationFailureException

  Provides a synchronous mechanism for informing an application about a change in the state of the replication node. StateChangeException is an abstract class, with subtypes for each type of Transition.

  A single state change can result in multiple state change exceptions (one per thread operating against the environment). Each exception is associated with the event that provoked the exception. The application can use this association to ensure that each such event is processed just once.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StateChangeException(String message, Exception reason)` Used when no state change event is available

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StateChangeEvent` | `getEvent()` Returns the event that resulted in this exception.

    - ### Methods inherited from class com.sleepycat.je.DatabaseException

      `getMessage`

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

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

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

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

- - ### Constructor Detail

    - #### StateChangeException

          protected StateChangeException(String message,
                              Exception reason)

      Used when no state change event is available

  - ### Method Detail

    - #### getEvent

          public StateChangeEvent getEvent()

      Returns the event that resulted in this exception.
      Returns:
        the state change event

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.