public class ConsulMastershipElector extends Object implements MastershipElector
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_DATACENTER |
AtomicBoolean |
IS_CONSUL_UP |
| Constructor and Description |
|---|
ConsulMastershipElector() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
init(String id,
String jobName) |
boolean |
isActiveDataCenter(String currentDataCenter) |
boolean |
isActiveVersion(String currentVersion) |
boolean |
isMaster() |
boolean |
isReady() |
public static final String ACTIVE_DATACENTER
public final AtomicBoolean IS_CONSUL_UP
public void init(String id, String jobName)
init in interface MastershipElectorpublic boolean isReady()
isReady in interface MastershipElectorpublic boolean isActiveVersion(String currentVersion)
isActiveVersion in interface MastershipElectorpublic boolean isActiveDataCenter(String currentDataCenter)
isActiveDataCenter in interface MastershipElectorpublic boolean isMaster()
isMaster in interface MastershipElectorpublic void close()
close in interface MastershipElectorCopyright © 2016 Cisco. All rights reserved.