public class LoadBalanceBuilder
extends java.lang.Object
Constructor and Description |
---|
LoadBalanceBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addAddress(java.lang.String address) |
void |
addBackend(LoadBalanceBackend backend) |
void |
addClient(ClientSocketFactory client)
Adds a client pool factory.
|
protected void |
applyBackendConfig(ClientSocketFactory factory,
LoadBalanceBackend backend) |
protected void |
applyDefaults(ClientSocketFactory factory) |
LoadBalanceManager |
create()
Returns the load balance manager.
|
protected ClientSocketFactory |
createClientSocketFactory(LoadBalanceBackend backend) |
protected ClientSocketFactory |
createClientSocketFactory(java.lang.String address) |
java.util.ArrayList<ClientSocketFactory> |
getClientList() |
LoadBalanceBackend |
getDefaults() |
java.lang.String |
getMeterCategory()
The statistics meter category.
|
LoadBalanceStrategy |
getStrategy()
The load balance strategy.
|
void |
setConnectionMin(int connectionMin) |
void |
setConnectTimeout(long connectTimeout) |
void |
setIdleTime(long idleTime) |
void |
setMeterCategory(java.lang.String category)
The statistics meter category.
|
void |
setRecoverTime(long recoverTime) |
void |
setSocketTimeout(long socketTimeout) |
void |
setStickyRequestHashGenerator(StickyRequestHashGenerator gen)
The request-sticky generator
|
void |
setStrategy(LoadBalanceStrategy strategy)
Sets the load balance strategy.
|
void |
setTargetCluster(CloudPod pod) |
void |
setTargetCluster(java.lang.String clusterId) |
void |
setTargetPort(int port) |
void |
setWarmupTime(long warmupTime) |
java.lang.String |
toString() |
public void setStrategy(LoadBalanceStrategy strategy)
public LoadBalanceStrategy getStrategy()
public void setStickyRequestHashGenerator(StickyRequestHashGenerator gen)
public void setTargetCluster(java.lang.String clusterId)
public void setTargetCluster(CloudPod pod)
public void setTargetPort(int port)
public void setConnectTimeout(long connectTimeout)
public void setConnectionMin(int connectionMin)
public void setSocketTimeout(long socketTimeout)
public void setIdleTime(long idleTime)
public void setRecoverTime(long recoverTime)
public void setWarmupTime(long warmupTime)
public LoadBalanceBackend getDefaults()
public void setMeterCategory(java.lang.String category)
public java.lang.String getMeterCategory()
public void addAddress(java.lang.String address)
public void addBackend(LoadBalanceBackend backend)
public void addClient(ClientSocketFactory client)
public java.util.ArrayList<ClientSocketFactory> getClientList()
public LoadBalanceManager create()
protected ClientSocketFactory createClientSocketFactory(java.lang.String address)
protected ClientSocketFactory createClientSocketFactory(LoadBalanceBackend backend)
protected void applyDefaults(ClientSocketFactory factory)
protected void applyBackendConfig(ClientSocketFactory factory, LoadBalanceBackend backend)
public java.lang.String toString()
toString
in class java.lang.Object