public class DynamicServerListLoadBalancer<T extends Server> extends BaseLoadBalancer
AbstractLoadBalancer.ServerGroup| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
serverListUpdateInProgress |
protected ServerListUpdater |
serverListUpdater |
protected ServerListUpdater.UpdateAction |
updateAction |
allServerList, allServerLock, lbStats, lbTimer, maxTotalPingTimeSeconds, name, ping, pingInProgress, pingIntervalSeconds, pingStrategy, rule, serverComparator, upServerList, upServerLock| Constructor and Description |
|---|
DynamicServerListLoadBalancer() |
DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig) |
DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig,
IRule rule,
IPing ping,
ServerList<T> serverList,
ServerListFilter<T> filter)
Deprecated.
|
DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig,
IRule rule,
IPing ping,
ServerList<T> serverList,
ServerListFilter<T> filter,
ServerListUpdater serverListUpdater) |
| Modifier and Type | Method and Description |
|---|---|
void |
enableAndInitLearnNewServersFeature()
Feature that lets us add new instances (from AMIs) to the list of
existing servers that the LB will use Call this method if you want this
feature enabled
|
void |
forceQuickPing() |
int |
getCoreThreads() |
long |
getDurationSinceLastUpdateMs() |
ServerListFilter<T> |
getFilter() |
java.lang.String |
getLastUpdate() |
int |
getNumberMissedCycles() |
ServerList<T> |
getServerListImpl() |
ServerListUpdater |
getServerListUpdater() |
void |
initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig) |
void |
setFilter(ServerListFilter<T> filter) |
protected void |
setServerListForZones(java.util.Map<java.lang.String,java.util.List<Server>> zoneServersMap) |
void |
setServerListImpl(ServerList<T> niwsServerList) |
void |
setServerListUpdater(ServerListUpdater serverListUpdater) |
void |
setServersList(java.util.List lsrv)
Set the list of servers used as the server pool.
|
void |
shutdown() |
void |
stopServerListRefreshing() |
java.lang.String |
toString() |
protected void |
updateAllServerList(java.util.List<T> ls)
Update the AllServer list in the LoadBalancer if necessary and enabled
|
void |
updateListOfServers() |
addServer, addServerListChangeListener, addServers, addServerStatusChangeListener, cancelPingTask, choose, chooseServer, getAllServers, getClientConfig, getLoadBalancerStats, getMaxTotalPingTime, getName, getPing, getPingInterval, getPrimeConnections, getReachableServers, getRule, getServerByIndex, getServerCount, getServerList, getServerList, init, isEnablePrimingConnections, isPingInProgress, lockAllServerList, lockUpServerList, markServerDown, markServerDown, primeCompleted, removeServerListChangeListener, removeServerStatusChangeListener, setEnablePrimingConnections, setLoadBalancerStats, setMaxTotalPingTime, setPing, setPingInterval, setPrimeConnections, setRulechooseServerprotected java.util.concurrent.atomic.AtomicBoolean serverListUpdateInProgress
protected final ServerListUpdater.UpdateAction updateAction
protected volatile ServerListUpdater serverListUpdater
public DynamicServerListLoadBalancer()
@Deprecated
public DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig,
IRule rule,
IPing ping,
ServerList<T> serverList,
ServerListFilter<T> filter)
public DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig,
IRule rule,
IPing ping,
ServerList<T> serverList,
ServerListFilter<T> filter,
ServerListUpdater serverListUpdater)
public DynamicServerListLoadBalancer(com.netflix.client.config.IClientConfig clientConfig)
public void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)
initWithNiwsConfig in interface com.netflix.client.IClientConfigAwareinitWithNiwsConfig in class BaseLoadBalancerpublic void setServersList(java.util.List lsrv)
BaseLoadBalancersetServersList in class BaseLoadBalancerprotected void setServerListForZones(java.util.Map<java.lang.String,java.util.List<Server>> zoneServersMap)
public ServerList<T> getServerListImpl()
public void setServerListImpl(ServerList<T> niwsServerList)
public ServerListFilter<T> getFilter()
public void setFilter(ServerListFilter<T> filter)
public ServerListUpdater getServerListUpdater()
public void setServerListUpdater(ServerListUpdater serverListUpdater)
public void forceQuickPing()
forceQuickPing in class BaseLoadBalancerpublic void enableAndInitLearnNewServersFeature()
public void stopServerListRefreshing()
public void updateListOfServers()
protected void updateAllServerList(java.util.List<T> ls)
ls - public java.lang.String toString()
toString in class BaseLoadBalancerpublic void shutdown()
shutdown in class BaseLoadBalancer@Monitor(name="LastUpdated",
type=INFORMATIONAL)
public java.lang.String getLastUpdate()
@Monitor(name="DurationSinceLastUpdateMs",
type=GAUGE)
public long getDurationSinceLastUpdateMs()
@Monitor(name="NumUpdateCyclesMissed",
type=GAUGE)
public int getNumberMissedCycles()
@Monitor(name="NumThreads",
type=GAUGE)
public int getCoreThreads()