- All Implemented Interfaces:
Supplier<String>
A
Supplier
for bootstrap servers that can toggle between 2 lists of servers.
- Since:
- 2.5
- Author:
- Gary Russell
-
Constructor Summary
Constructors
Construct an instance with primary and secondary bootstrap servers.
-
Method Summary
boolean
Get whether or not the primary cluster is active.
void
void
Use the secondary cluster.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ABSwitchCluster
Construct an instance with primary and secondary bootstrap servers.
- Parameters:
primary
- the primary.
secondary
- the secondary.
-
Method Details
-
-
isPrimary
public boolean isPrimary()
Get whether or not the primary cluster is active.
- Returns:
- true for primary, false for secondary.
-
primary
public void primary()
Use the primary cluster.
-
secondary
public void secondary()
Use the secondary cluster.