Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je.rep
Class StateChangeEvent

    java.lang.Object
      com.sleepycat.je.rep.StateChangeEvent

    public class StateChangeEvent

extends Object

Communicates the `state` change at a node to the StateChangeListener. There is a distinct instance of this event representing each state change at a node.

Each event instance may have zero or more state change related exceptions associated with it. The exceptions are of type `StateChangeException`. `StateChangeException` has a method called `StateChangeException.getEvent()` that can be used to associate an event with an exception.

See Also:
  `StateChangeListener`

Method Summary
`long` | `getEventTime()` Returns the time (in nano second units) the event occurred, as reported by `System.nanoTime()`
`String` | `getMasterNodeName()` Returns the node name identifying the master at the time of the event.
`ReplicatedEnvironment.State` | `getState()` Returns the state that the node has transitioned to.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getState

    public ReplicatedEnvironment.State getState()

  Returns the state that the node has transitioned to.

  Returns:
    the new `State`resulting from this event``

### getEventTime

    public long getEventTime()

  Returns the time (in nano second units) the event occurred, as reported by `System.nanoTime()`

  Returns:
    the time the event occurred, in nanoseconds

### getMasterNodeName

    public String getMasterNodeName()
                             throws IllegalStateException

  Returns the node name identifying the master at the time of the event.

  Returns:
    the master node name
  Throws:
    `IllegalStateException` - if the node is in the `DETACHED` or `UNKNOWN` state.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2010 Oracle. All rights reserved.