public class ABSwitchCluster
extends java.lang.Object
implements java.util.function.Supplier<java.lang.String>
Supplier for bootstrap servers that can toggle between 2 lists of servers.| Constructor and Description |
|---|
ABSwitchCluster(java.lang.String primary,
java.lang.String secondary)
Construct an instance with primary and secondary bootstrap servers.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get() |
boolean |
isPrimary()
Get whether or not the primary cluster is active.
|
void |
primary()
Use the primary cluster.
|
void |
secondary()
Use the secondary cluster.
|
public ABSwitchCluster(java.lang.String primary,
java.lang.String secondary)
primary - the primary.secondary - the secondary.public java.lang.String get()
get in interface java.util.function.Supplier<java.lang.String>public boolean isPrimary()
public void primary()
public void secondary()