public class CloudSolrServer extends SolrServer
LBHttpSolrServer to issue requests.| Constructor and Description |
|---|
CloudSolrServer(String zkHost) |
CloudSolrServer(String zkHost,
LBHttpSolrServer lbServer) |
CloudSolrServer(String zkHost,
LBHttpSolrServer lbServer,
boolean updatesToLeaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connect to the zookeeper ensemble.
|
LBHttpSolrServer |
getLbServer() |
ZkStateReader |
getZkStateReader() |
NamedList<Object> |
request(SolrRequest request)
SolrServer implementations need to implement how a request is actually processed
|
void |
setDefaultCollection(String collection)
Sets the default collection for request
|
void |
setZkClientTimeout(int zkClientTimeout)
Set the timeout to the zookeeper ensemble in ms
|
void |
setZkConnectTimeout(int zkConnectTimeout)
Set the connect timeout to the zookeeper ensemble in ms
|
void |
shutdown()
Release allocated resources.
|
add, add, add, add, addBean, addBean, addBeans, addBeans, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query, queryAndStreamResponse, rollbackpublic CloudSolrServer(String zkHost) throws MalformedURLException
zkHost - The client endpoint of the zookeeper quorum containing the cloud state,
in the form HOST:PORT.MalformedURLExceptionpublic CloudSolrServer(String zkHost, LBHttpSolrServer lbServer)
zkHost - The client endpoint of the zookeeper quorum containing the cloud state,
in the form HOST:PORT.lbServer - LBHttpSolrServer instance for requests.public CloudSolrServer(String zkHost, LBHttpSolrServer lbServer, boolean updatesToLeaders)
zkHost - The client endpoint of the zookeeper quorum containing the cloud state,
in the form HOST:PORT.lbServer - LBHttpSolrServer instance for requests.updatesToLeaders - sends updates only to leaders - defaults to truepublic ZkStateReader getZkStateReader()
public void setDefaultCollection(String collection)
public void setZkConnectTimeout(int zkConnectTimeout)
public void setZkClientTimeout(int zkClientTimeout)
public void connect()
public NamedList<Object> request(SolrRequest request) throws SolrServerException, IOException
SolrServerrequest in class SolrServerSolrServerExceptionIOExceptionpublic void shutdown()
SolrServershutdown in class SolrServerpublic LBHttpSolrServer getLbServer()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.