public class PrimeConnections
extends java.lang.Object
This class is not protocol specific. Actual priming operation is delegated to
instance of IPrimeConnection
, which is instantiated using reflection
according to property CommonClientConfigKey.PrimeConnectionsClassName
.
Modifier and Type | Class and Description |
---|---|
static class |
PrimeConnections.PrimeConnectionEndStats |
static interface |
PrimeConnections.PrimeConnectionListener |
Constructor and Description |
---|
PrimeConnections(java.lang.String name,
com.netflix.client.config.IClientConfig niwsClientConfig) |
PrimeConnections(java.lang.String name,
int maxRetries,
long maxTotalTimeToPrimeConnections,
java.lang.String primeConnectionsURI) |
PrimeConnections(java.lang.String name,
int maxRetries,
long maxTotalTimeToPrimeConnections,
java.lang.String primeConnectionsURI,
float primeRatio) |
Modifier and Type | Method and Description |
---|---|
PrimeConnections.PrimeConnectionEndStats |
getEndStats() |
void |
primeConnections(java.util.List<Server> servers)
Prime connections, blocking until configured percentage (default is 100%) of target servers are primed
or max time is reached.
|
java.util.List<java.util.concurrent.Future<java.lang.Boolean>> |
primeConnectionsAsync(java.util.List<Server> servers,
PrimeConnections.PrimeConnectionListener listener)
Prime servers asynchronously.
|
void |
shutdown() |
public PrimeConnections(java.lang.String name, com.netflix.client.config.IClientConfig niwsClientConfig)
public PrimeConnections(java.lang.String name, int maxRetries, long maxTotalTimeToPrimeConnections, java.lang.String primeConnectionsURI)
public PrimeConnections(java.lang.String name, int maxRetries, long maxTotalTimeToPrimeConnections, java.lang.String primeConnectionsURI, float primeRatio)
public void primeConnections(java.util.List<Server> servers)
CommonClientConfigKey.MinPrimeConnectionsRatio
,
CommonClientConfigKey.MaxTotalTimeToPrimeConnections
public PrimeConnections.PrimeConnectionEndStats getEndStats()
public java.util.List<java.util.concurrent.Future<java.lang.Boolean>> primeConnectionsAsync(java.util.List<Server> servers, PrimeConnections.PrimeConnectionListener listener)
servers
- listener
- public void shutdown()