public class EmbeddedLeaderService extends Object
An election service for contenders can be created via createLeaderElectionService()
,
a listener service for leader observers can be created via createLeaderRetrievalService()
.
Constructor and Description |
---|
EmbeddedLeaderService(Executor notificationsDispatcher) |
Modifier and Type | Method and Description |
---|---|
LeaderElectionService |
createLeaderElectionService() |
LeaderRetrievalService |
createLeaderRetrievalService() |
void |
shutdown()
Shuts down this leader election service.
|
public EmbeddedLeaderService(Executor notificationsDispatcher)
public void shutdown()
This method does not perform a clean revocation of the leader status and no notification to any leader listeners. It simply notifies all contenders and listeners that the service is no longer available.
public LeaderElectionService createLeaderElectionService()
public LeaderRetrievalService createLeaderRetrievalService()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.