public class UpdateShardHandler extends Object implements SolrMetricProducer, SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
Constructor and Description |
---|
UpdateShardHandler(UpdateShardHandlerConfig cfg) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Implementations should always call
SolrMetricProducer.super.close() to ensure that
metrics with the same life-cycle as this component are properly unregistered. |
SolrInfoBean.Category |
getCategory()
Category of this component
|
int |
getConnectionTimeout() |
org.apache.http.impl.conn.PoolingHttpClientConnectionManager |
getDefaultConnectionManager() |
org.apache.http.client.HttpClient |
getDefaultHttpClient() |
String |
getDescription()
Simple one or two line description
|
Set<String> |
getMetricNames()
Modifiable set of metric names that this component reports (default is null,
which means none).
|
String |
getName()
Simple common usage name, e.g.
|
ExecutorService |
getRecoveryExecutor() |
org.apache.http.impl.conn.PoolingHttpClientConnectionManager |
getRecoveryOnlyConnectionManager() |
org.apache.http.client.HttpClient |
getRecoveryOnlyHttpClient() |
int |
getSocketTimeout() |
SolrMetricsContext |
getSolrMetricsContext()
Implementing classes should override this method to provide the context obtained in
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String) to ensure proper cleanup of metrics
at the end of the life-cycle of this component. |
ExecutorService |
getUpdateExecutor()
This method returns an executor that is meant for non search related tasks.
|
Http2SolrClient |
getUpdateOnlyHttpClient() |
void |
initializeMetrics(SolrMetricsContext parentContext,
String scope)
Initialize metrics specific to this producer.
|
void |
setSecurityBuilder(HttpClientBuilderPlugin builder) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUniqueMetricTag, initializeMetrics
getMetricRegistry, getMetricsSnapshot, registerMetricName
public UpdateShardHandler(UpdateShardHandlerConfig cfg)
public String getName()
SolrInfoBean
getName
in interface SolrInfoBean
public void initializeMetrics(SolrMetricsContext parentContext, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
parentContext
- parent metrics context. If this component has the same life-cycle as the parent
it can simply use the parent context, otherwise it should obtain a child context
using SolrMetricsContext.getChildContext(Object)
passing this
as the child.scope
- component scopepublic String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
public SolrInfoBean.Category getCategory()
SolrInfoBean
getCategory
in interface SolrInfoBean
public Set<String> getMetricNames()
SolrInfoBean
SolrInfoBean.registerMetricName(String)
to capture what metrics names are reported from this component.
NOTE: this set has to allow iteration under modifications.
getMetricNames
in interface SolrInfoBean
public SolrMetricsContext getSolrMetricsContext()
SolrMetricProducer
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String)
to ensure proper cleanup of metrics
at the end of the life-cycle of this component.getSolrMetricsContext
in interface SolrMetricProducer
public org.apache.http.client.HttpClient getDefaultHttpClient()
public Http2SolrClient getUpdateOnlyHttpClient()
public org.apache.http.client.HttpClient getRecoveryOnlyHttpClient()
public ExecutorService getUpdateExecutor()
public org.apache.http.impl.conn.PoolingHttpClientConnectionManager getDefaultConnectionManager()
public org.apache.http.impl.conn.PoolingHttpClientConnectionManager getRecoveryOnlyConnectionManager()
public ExecutorService getRecoveryExecutor()
public void close()
SolrMetricProducer
SolrMetricProducer.super.close()
to ensure that
metrics with the same life-cycle as this component are properly unregistered. This prevents
obscure memory leaks.close
in interface AutoCloseable
close
in interface SolrMetricProducer
public int getSocketTimeout()
public int getConnectionTimeout()
public void setSecurityBuilder(HttpClientBuilderPlugin builder)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.