public class DefaultSolrClientPool extends java.lang.Object implements SolrClientPool
SolrClientPool.| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultSolrClientPool.SolrClientPoolTenantListener |
| Modifier and Type | Field and Description |
|---|---|
protected static long |
CHECK_INTERVAL_DEFAULT_VALUE |
protected static java.lang.String |
CHECK_INTERVAL_PROPERTY |
protected static java.lang.String |
CHECK_THREAD_NAME_PREFIX |
protected static java.lang.String |
CREATE_METHOD_PARAM |
protected static java.lang.String |
INDEX_PARAM |
protected static long |
SCHEDULER_TERMINATION_TIMEOUT |
protected static java.lang.String |
SOLR_CLIENT_PARAM |
| Constructor and Description |
|---|
DefaultSolrClientPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected SolrClientsWrapper |
check(java.lang.String solrServerConfigName,
SolrClientsWrapper clientsWrapper) |
protected void |
checkAll() |
protected CachedSolrClient |
createSolrClient(SolrConfig solrConfig,
SolrClientConfig solrClientConfig,
java.util.function.Function<SolrConfig,SolrClient> createMethod,
java.util.function.Consumer<SolrClient> closeMethod) |
protected TenantListener |
createTenantListener() |
protected void |
destroySession() |
protected SolrClientsWrapper |
doGetOrCreate(SolrConfig solrConfig,
SolrClientsWrapper clientsWrapper,
SolrClientType clientType,
java.util.function.Function<SolrConfig,SolrClient> createMethod,
java.util.function.Consumer<SolrClient> closeMethod) |
ConfigurationService |
getConfigurationService() |
ModelService |
getModelService() |
CachedSolrClient |
getOrCreate(Index index,
SolrClientType clientType,
java.util.function.Function<SolrConfig,SolrClient> createMethod)
Returns a
SolrClient from the pool or creates it if it does not exist. |
CachedSolrClient |
getOrCreate(Index index,
SolrClientType clientType,
java.util.function.Function<SolrConfig,SolrClient> createMethod,
java.util.function.Consumer<SolrClient> closeMethod)
Returns a
SolrClient from the pool or creates it if it does not exist. |
protected java.util.concurrent.ScheduledExecutorService |
getScheduler() |
SessionService |
getSessionService() |
protected java.util.concurrent.ConcurrentMap<java.lang.String,SolrClientsWrapper> |
getSolrClients() |
Converter<SolrServerConfigModel,SolrConfig> |
getSolrServerConfigConverter() |
SolrServerConfigDao |
getSolrServerConfigDao() |
protected java.lang.String |
getTenantId() |
TenantService |
getTenantService() |
protected void |
initializeSession() |
void |
invalidateAll()
Invalidates the clients pool.
|
protected SolrServerConfigModel |
loadSolrServerConfig(java.lang.String name) |
protected CachedSolrClient |
resolveSolrClient(SolrClientsWrapper clientsWrapper,
SolrClientType solrClientType) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
void |
setSolrServerConfigConverter(Converter<SolrServerConfigModel,SolrConfig> solrServerConfigConverter) |
void |
setSolrServerConfigDao(SolrServerConfigDao solrServerConfigDao) |
void |
setTenantService(TenantService tenantService) |
protected void |
startCleanUpThread() |
protected void |
stopCleanUpThread() |
protected static final java.lang.String INDEX_PARAM
protected static final java.lang.String SOLR_CLIENT_PARAM
protected static final java.lang.String CREATE_METHOD_PARAM
protected static final java.lang.String CHECK_INTERVAL_PROPERTY
protected static final long CHECK_INTERVAL_DEFAULT_VALUE
protected static final java.lang.String CHECK_THREAD_NAME_PREFIX
protected static final long SCHEDULER_TERMINATION_TIMEOUT
protected java.lang.String getTenantId()
protected java.util.concurrent.ScheduledExecutorService getScheduler()
protected java.util.concurrent.ConcurrentMap<java.lang.String,SolrClientsWrapper> getSolrClients()
public void afterPropertiesSet()
public CachedSolrClient getOrCreate(Index index, SolrClientType clientType, java.util.function.Function<SolrConfig,SolrClient> createMethod) throws SolrServiceException
SolrClientPoolSolrClient from the pool or creates it if it does not exist.getOrCreate in interface SolrClientPoolindex - - IndexclientType - - SolrClientTypecreateMethod - - method used to create a new instance of SolrClientSolrClientSolrServiceException - if an error occurspublic CachedSolrClient getOrCreate(Index index, SolrClientType clientType, java.util.function.Function<SolrConfig,SolrClient> createMethod, java.util.function.Consumer<SolrClient> closeMethod) throws SolrServiceException
SolrClientPoolSolrClient from the pool or creates it if it does not exist.getOrCreate in interface SolrClientPoolindex - - IndexclientType - - SolrClientTypecreateMethod - - method used to create a new instance of SolrClientcloseMethod - - method used to release resources associated with the created instance of SolrClientSolrClientSolrServiceException - if an error occurspublic void invalidateAll()
SolrClientPoolinvalidateAll in interface SolrClientPoolprotected CachedSolrClient resolveSolrClient(SolrClientsWrapper clientsWrapper, SolrClientType solrClientType)
protected SolrClientsWrapper doGetOrCreate(SolrConfig solrConfig, SolrClientsWrapper clientsWrapper, SolrClientType clientType, java.util.function.Function<SolrConfig,SolrClient> createMethod, java.util.function.Consumer<SolrClient> closeMethod)
protected CachedSolrClient createSolrClient(SolrConfig solrConfig, SolrClientConfig solrClientConfig, java.util.function.Function<SolrConfig,SolrClient> createMethod, java.util.function.Consumer<SolrClient> closeMethod)
protected TenantListener createTenantListener()
protected SolrServerConfigModel loadSolrServerConfig(java.lang.String name)
protected void startCleanUpThread()
protected void stopCleanUpThread()
protected void initializeSession()
protected void checkAll()
protected SolrClientsWrapper check(java.lang.String solrServerConfigName, SolrClientsWrapper clientsWrapper)
protected void destroySession()
public ModelService getModelService()
public void setModelService(ModelService modelService)
public ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
public TenantService getTenantService()
public void setTenantService(TenantService tenantService)
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public SolrServerConfigDao getSolrServerConfigDao()
public void setSolrServerConfigDao(SolrServerConfigDao solrServerConfigDao)
public Converter<SolrServerConfigModel,SolrConfig> getSolrServerConfigConverter()
public void setSolrServerConfigConverter(Converter<SolrServerConfigModel,SolrConfig> solrServerConfigConverter)
Copyright © 2018 SAP SE. All Rights Reserved.