public class RibbonServiceCallStaticServerListStrategy extends com.netflix.loadbalancer.AbstractServerList<RibbonServer> implements com.netflix.loadbalancer.ServerList<RibbonServer>, org.apache.camel.spi.ServiceCallServerListStrategy<RibbonServer>
getUpdatedListOfServers()
that is called by Ribbon to refresh the known list
of servers. For example to periodically query a remote server registry for a list of active servers.Constructor and Description |
---|
RibbonServiceCallStaticServerListStrategy() |
RibbonServiceCallStaticServerListStrategy(List<RibbonServer> servers) |
Modifier and Type | Method and Description |
---|---|
void |
addServer(RibbonServer server)
Add a server to the known list of servers.
|
void |
addServer(String host,
int port)
Add a server to the known list of servers.
|
static RibbonServiceCallStaticServerListStrategy |
build(String servers)
Build a
RibbonServiceCallStaticServerListStrategy with the initial list of servers |
List<RibbonServer> |
getInitialListOfServers() |
List<RibbonServer> |
getInitialListOfServers(String name) |
List<RibbonServer> |
getUpdatedListOfServers() |
List<RibbonServer> |
getUpdatedListOfServers(String name) |
void |
initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig) |
void |
removeServer(String host,
int port)
Remove an existing server from the list of known servers.
|
public RibbonServiceCallStaticServerListStrategy()
public RibbonServiceCallStaticServerListStrategy(List<RibbonServer> servers)
public static RibbonServiceCallStaticServerListStrategy build(String servers)
RibbonServiceCallStaticServerListStrategy
with the initial list of serversservers
- servers separated by comma in the format: host:port,host2:port,host3:port and so on.public void addServer(RibbonServer server)
public void addServer(String host, int port)
public void removeServer(String host, int port)
public void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)
initWithNiwsConfig
in interface com.netflix.client.IClientConfigAware
public List<RibbonServer> getInitialListOfServers()
getInitialListOfServers
in interface com.netflix.loadbalancer.ServerList<RibbonServer>
public List<RibbonServer> getUpdatedListOfServers()
getUpdatedListOfServers
in interface com.netflix.loadbalancer.ServerList<RibbonServer>
public List<RibbonServer> getInitialListOfServers(String name)
getInitialListOfServers
in interface org.apache.camel.spi.ServiceCallServerListStrategy<RibbonServer>
public List<RibbonServer> getUpdatedListOfServers(String name)
getUpdatedListOfServers
in interface org.apache.camel.spi.ServiceCallServerListStrategy<RibbonServer>
Apache Camel