public class TrackingShardHandlerFactory extends HttpShardHandlerFactory
This is a test helper only and should *not* be used for production.
| Modifier and Type | Class and Description |
|---|---|
static class |
TrackingShardHandlerFactory.RequestTrackingQueue
A queue having helper methods to select requests by shard and purpose.
|
static class |
TrackingShardHandlerFactory.ShardRequestAndParams |
defaultClient, logDEFAULT_SHARDHANDLER_INFO| Constructor and Description |
|---|
TrackingShardHandlerFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ShardHandler |
getShardHandler()
Get
ShardHandler that uses the default http client. |
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> |
getTrackingQueue() |
boolean |
isTracking() |
static void |
setTrackingQueue(List<JettySolrRunner> runners,
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Sets the tracking queue for all nodes participating in this cluster.
|
static void |
setTrackingQueue(MiniSolrCloudCluster cluster,
Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Sets the tracking queue for all nodes participating in this cluster.
|
void |
setTrackingQueue(Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Set the tracking queue for this factory.
|
createLoadbalancer, getClientParams, getParameter, getShardHandler, getThreadPoolExecutor, init, makeLoadBalancedRequest, makeURLList, newCompletionService, reconfigureHttpClientnewInstancepublic void setTrackingQueue(Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
Queue.offer(Object)
with a TrackingShardHandlerFactory.ShardRequestAndParams
instance whenever
ShardHandler.submit(ShardRequest, String, org.apache.solr.common.params.ModifiableSolrParams)
is called before the request is actually submitted to the
wrapped HttpShardHandlerFactory instance.
If a tracking queue is already set then this call will overwrite and replace the previous queue with this one.
queue - the Queue to be used for tracking shard requestspublic Queue<TrackingShardHandlerFactory.ShardRequestAndParams> getTrackingQueue()
Queue being used for tracking, null if none
has been setpublic boolean isTracking()
setTrackingQueue(java.util.List, java.util.Queue), false otherwisepublic ShardHandler getShardHandler()
HttpShardHandlerFactoryShardHandler that uses the default http client.getShardHandler in class HttpShardHandlerFactorypublic void close()
close in class HttpShardHandlerFactorypublic static void setTrackingQueue(MiniSolrCloudCluster cluster, Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
This is equivalent to calling:
TrackingShardHandlerFactory.setTrackingQueue(cluster.getJettySolrRunners(), queue)
public static void setTrackingQueue(List<JettySolrRunner> runners, Queue<TrackingShardHandlerFactory.ShardRequestAndParams> queue)
runners - a list of JettySolrRunner nodesqueue - an implementation of Queue which
accepts TrackingShardHandlerFactory.ShardRequestAndParams
instancesCopyright © 2000–2015 The Apache Software Foundation. All rights reserved.