* See the file LICENSE for redistribution information.
* Copyright (c) 2002, 2013 Oracle and/or its affiliates. All rights reserved.
of the replicated environment and choosing how to route database operations.
Statedetermines which operations are currently permitted on the node. For example, only the
node can execute write operations.
The Listener is registered with the replicated environment using
is at most one Listener associated with the actual environment (not an
handle) at any given instance in time.
examples} for information on different approaches toward routing
database operations and an example of using the StateChangeListener.
StateChangeListeneris first associated with the
method and subsequently each time there is a state change.
This method should do the minimal amount of work, queuing any resource intensive operations for processing by another thread before returning to the caller, so that it does not unduly delay the other housekeeping operations performed by the internal thread which invokes this method.
stateChangeEventthe new state change event
java.lang.RuntimeExceptionAny uncaught exceptions will result in the shutdown of the ReplicatedEnvironment.