public class AffinityReplicaListTransformerFactory extends Object implements ReplicaListTransformerFactory
AffinityReplicaListTransformer
that reorders replica routing
preferences deterministically, based on request parameters.
Default names of params that contain the values by which routing is determined may be configured
at the time of AffinityReplicaListTransformerFactory
construction, and may be
overridden by the config spec passed to getInstance(String, SolrParams, ReplicaListTransformerFactory)
If no defaultHashParam name is specified at time of factory construction, the routing dividend will
be derived by hashing the String
value of the CommonParams.Q
param.Constructor and Description |
---|
AffinityReplicaListTransformerFactory() |
AffinityReplicaListTransformerFactory(NamedList<?> c) |
AffinityReplicaListTransformerFactory(String defaultDividendParam,
String defaultHashParam) |
Modifier and Type | Method and Description |
---|---|
ReplicaListTransformer |
getInstance(String configSpec,
SolrParams requestParams,
ReplicaListTransformerFactory fallback) |
public AffinityReplicaListTransformerFactory()
public AffinityReplicaListTransformerFactory(String defaultDividendParam, String defaultHashParam)
public AffinityReplicaListTransformerFactory(NamedList<?> c)
public ReplicaListTransformer getInstance(String configSpec, SolrParams requestParams, ReplicaListTransformerFactory fallback)
getInstance
in interface ReplicaListTransformerFactory
configSpec
- spec for dynamic configuration of ReplicaListTransformerrequestParams
- the request parameters for which the ReplicaListTransformer is being generatedfallback
- used to generate fallback value; the getInstance() method of the specified fallback must not
return null; The fallback value itself may be null if this implementation is known to never return null (i.e., if
fallback will never be needed)Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.