@ -224,6 +224,21 @@ public final class ServiceInstanceListSupplierBuilder {
@@ -224,6 +224,21 @@ public final class ServiceInstanceListSupplierBuilder {
return this ;
}
/ * *
* Adds a { @link ZonePreferenceServiceInstanceListSupplier } to the
* { @link ServiceInstanceListSupplier } hierarchy .
* @param zoneName desired zone for zone preference
* @return the { @link ServiceInstanceListSupplierBuilder } object
* /
public ServiceInstanceListSupplierBuilder withZonePreference ( String zoneName ) {
DelegateCreator creator = ( context , delegate ) - > {
LoadBalancerZoneConfig zoneConfig = new LoadBalancerZoneConfig ( zoneName ) ;
return new ZonePreferenceServiceInstanceListSupplier ( delegate , zoneConfig ) ;
} ;
this . creators . add ( creator ) ;
return this ;
}
/ * *
* Adds a { @link RequestBasedStickySessionServiceInstanceListSupplier } to the
* { @link ServiceInstanceListSupplier } hierarchy .