public class StateChangeEvent
extends java.lang.Object
implements java.io.Serializable
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.
StateChangeListener
,
Serialized FormModifier and Type | Method and Description |
---|---|
long |
getEventTime()
Returns the time (in nano second units) the event occurred, as reported
by
System.nanoTime() |
java.lang.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.
|
public ReplicatedEnvironment.State getState()
State
resulting from this eventpublic long getEventTime()
System.nanoTime()
public java.lang.String getMasterNodeName() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the node is in the
DETACHED
or UNKNOWN
state.Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.