mirror of
https://github.com/corda/corda.git
synced 2025-06-19 15:43:52 +00:00
ENT-2559: Gracefully handle Artemis connectivity loss during Bridge leader election (#1436)
* ENT-2559: KDocs update and change visibility identifiers. * ENT-2559: Handle upstream dependencies going up and down. * ENT-2500: Address code review comments by @mnesbit
This commit is contained in:
@ -5,20 +5,20 @@ package net.corda.nodeapi.internal.zookeeper
|
||||
* Listener interface for leader election results, to avoid public reference to shadowed curator classes.
|
||||
*/
|
||||
interface CordaLeaderListener {
|
||||
/**
|
||||
* This is called when the LeaderLatch's state goes from hasLeadership = false to hasLeadership = true.
|
||||
*
|
||||
* Note that it is possible that by the time this method call happens, hasLeadership has fallen back to false. If
|
||||
* this occurs, you can expect {@link #notLeader()} to also be called.
|
||||
*/
|
||||
fun notLeader()
|
||||
|
||||
/**
|
||||
* This is called when the LeaderLatch's state goes from hasLeadership = true to hasLeadership = false.
|
||||
*
|
||||
* Note that it is possible that by the time this method call happens, hasLeadership has become true. If
|
||||
* this occurs, you can expect {@link #isLeader()} to also be called.
|
||||
*/
|
||||
fun notLeader()
|
||||
|
||||
/**
|
||||
* This is called when the LeaderLatch's state goes from hasLeadership = false to hasLeadership = true.
|
||||
*
|
||||
* Note that it is possible that by the time this method call happens, hasLeadership has fallen back to false. If
|
||||
* this occurs, you can expect {@link #notLeader()} to also be called.
|
||||
*/
|
||||
fun isLeader()
|
||||
}
|
||||
|
||||
@ -58,12 +58,12 @@ interface ZkLeader {
|
||||
fun removeLeadershipListener(listener: CordaLeaderListener)
|
||||
|
||||
/**
|
||||
* @return [true] if client is the current leader, [false] otherwise
|
||||
* @return `true` if client is the current leader, `false` otherwise
|
||||
*/
|
||||
fun isLeader(): Boolean
|
||||
|
||||
/**
|
||||
* @return [true] if client is started, [false] otherwise
|
||||
* @return `true` if client is started, `false` otherwise
|
||||
*/
|
||||
fun isStarted(): Boolean
|
||||
}
|
Reference in New Issue
Block a user