@Managed public abstract class NodeNotifier extends com.kabira.platform.disteng.DENodeNotifier
When an instance of this class is created, the active callback is called for each active remote node already discovered by the local node.
The execution order for these callbacks is serialized by the runtime. If a node becomes unavailable while the active callback is executed, the execution of the unavailable callback is deferred until after the active callback finishes execution.
When nodes become active or unavailable, the callback is executed in a system defined transaction. Applications should create and delete instances of this class in a separate transaction that does not make any other calls to methods in the highavailability package. Doing this will reduce the potential for transaction deadlocks when the callbacks are executed.
Constructor and Description |
---|
NodeNotifier() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
active(java.lang.String remoteNode)
Called when a node becomes active.
|
protected abstract void |
unavailable(java.lang.String remoteNode)
Called when a node becomes unavailable.
|
public NodeNotifier()
protected abstract void active(java.lang.String remoteNode)
active
in class com.kabira.platform.disteng.DENodeNotifier
remoteNode
- The name of remote node.
This operation is called whenever a remote node becomes active.
Remote work can be executed on the new remote node when this callback is executed.
protected abstract void unavailable(java.lang.String remoteNode)
unavailable
in class com.kabira.platform.disteng.DENodeNotifier
remoteNode
- The name of remote node.
This operation is called whenever a remote node becomes unavailable.
Remote work should not be attempted on the unavailable remote node when this callback is executed.