public class StandaloneLeaderRetrievalService extends Object implements LeaderRetrievalService
LeaderRetrievalService. This implementation assumes that
there is only a single contender for leadership (e.g., a single JobManager or ResourceManager
process) and that this process is reachable under a constant address.
As soon as this service is started, it immediately notifies the leader listener of the leader contender with the pre-configured address.
| 构造器和说明 |
|---|
StandaloneLeaderRetrievalService(String leaderAddress)
已过时。
Use
StandaloneLeaderRetrievalService(String, UUID) instead |
StandaloneLeaderRetrievalService(String leaderAddress,
UUID leaderId)
Creates a StandaloneLeaderRetrievalService with the given leader address.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
start(LeaderRetrievalListener listener)
Starts the leader retrieval service with the given listener to listen for new leaders.
|
void |
stop()
Stops the leader retrieval service.
|
@Deprecated public StandaloneLeaderRetrievalService(String leaderAddress)
StandaloneLeaderRetrievalService(String, UUID) insteadleaderAddress - The leader's pre-configured addresspublic void start(LeaderRetrievalListener listener)
LeaderRetrievalServicestart 在接口中 LeaderRetrievalServicelistener - The leader retrieval listener which will be notified about new leaders.public void stop()
LeaderRetrievalServicestop 在接口中 LeaderRetrievalServiceCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.