public class StandaloneLeaderRetrievalService extends Object implements LeaderRetrievalService
LeaderRetrievalService
. The standalone implementation
assumes that there is only a single JobManager
whose
address is given to the service when creating it. This address is directly given to the
LeaderRetrievalListener
when the service is started.Constructor and Description |
---|
StandaloneLeaderRetrievalService(String jobManagerAddress)
Creates a StandaloneLeaderRetrievalService with the given JobManager address.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public StandaloneLeaderRetrievalService(String jobManagerAddress)
jobManagerAddress
- The JobManager's address which is returned to the
LeaderRetrievalListener
public void start(LeaderRetrievalListener listener)
LeaderRetrievalService
start
in interface LeaderRetrievalService
listener
- The leader retrieval listener which will be notified about new leaders.public void stop()
LeaderRetrievalService
stop
in interface LeaderRetrievalService
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.