クラス LeaderInitiator
java.lang.ObjectSE
org.springframework.integration.zookeeper.leader.LeaderInitiator
- 実装済みのインターフェース一覧:
Lifecycle, Phased, SmartLifecycle
ZooKeeper/Curator を使用したブートストラップリーダーシップ
candidates。構築時に、start() を呼び出して、リーダー選出の候補者を登録する必要があります。- 導入:
- 4.2
- 作成者:
- Patrick Peralta, Janne Valkealahti, Gary Russell, Artem Bilan, Ivan Zaitsev, Christian Tzolov
ネストされたクラスの概要
ネストされたクラス修飾子と型クラス説明classキュレーターが支援するリーダーシップコンテキストの実装。protected classキュレーターのリーダー選出リスナーの実装。フィールド概要
インターフェース SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクター概要
コンストラクターコンストラクター説明LeaderInitiator(org.apache.curator.framework.CuratorFramework client, Candidate candidate) LeaderInitiatorを作成します。LeaderInitiator(org.apache.curator.framework.CuratorFramework client, Candidate candidate, StringSE namespace) LeaderInitiatorを作成します。方法の概要
修飾子と型メソッド説明イニシエーターのコンテキスト。intgetPhase()booleanbooleanvoidsetAutoStartup(boolean autoStartup) voidsetLeaderEventPublisher(LeaderEventPublisher leaderEventPublisher) LeaderEventPublisherを設定します。voidsetPhase(int phase) voidstart()リーダー選出のためのcandidateの登録を開始します。voidstop()リーダー選出のためのcandidateの登録を停止します。クラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース SmartLifecycle から継承されたメソッド
isPauseable, stop
コンストラクターの詳細
LeaderInitiator
LeaderInitiatorを作成します。- パラメーター:
client- キュレータークライアントcandidate- リーダー選出候補
LeaderInitiator
public LeaderInitiator(org.apache.curator.framework.CuratorFramework client, Candidate candidate, StringSE namespace) LeaderInitiatorを作成します。- パラメーター:
client- キュレータークライアントcandidate- リーダー選出候補namespace- ZooKeeper の名前空間ベースパス
方法の詳細
isRunning
getPhase
public int getPhase()- 次で指定:
- インターフェース
Phased内のgetPhase - 次で指定:
- インターフェース
SmartLifecycle内のgetPhase
setPhase
public void setPhase(int phase) - パラメーター:
phase- フェーズ- 関連事項:
isAutoStartup
public boolean isAutoStartup()- 次で指定:
- インターフェース
SmartLifecycle内のisAutoStartup
setAutoStartup
public void setAutoStartup(boolean autoStartup) - パラメーター:
autoStartup- 自動的に開始する場合は true- 関連事項:
start
stop
setLeaderEventPublisher
LeaderEventPublisherを設定します。- パラメーター:
leaderEventPublisher- イベント発行者
getContext