[7588] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
| 2 | <!--NewPage--> |
---|
| 3 | <HTML> |
---|
| 4 | <HEAD> |
---|
| 5 | <!-- Generated by javadoc (build 1.6.0_24) on Mon Jun 25 15:26:26 EDT 2012 --> |
---|
| 6 | <META http-equiv="Content-Type" content="text/html; charset=utf-8"> |
---|
| 7 | <TITLE> |
---|
| 8 | LBHttpSolrServer (Solr 4.0.0-ALPHA API) |
---|
| 9 | </TITLE> |
---|
| 10 | |
---|
| 11 | <META NAME="date" CONTENT="2012-06-25"> |
---|
| 12 | |
---|
| 13 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> |
---|
| 14 | |
---|
| 15 | <SCRIPT type="text/javascript"> |
---|
| 16 | function windowTitle() |
---|
| 17 | { |
---|
| 18 | if (location.href.indexOf('is-external=true') == -1) { |
---|
| 19 | parent.document.title="LBHttpSolrServer (Solr 4.0.0-ALPHA API)"; |
---|
| 20 | } |
---|
| 21 | } |
---|
| 22 | </SCRIPT> |
---|
| 23 | <NOSCRIPT> |
---|
| 24 | </NOSCRIPT> |
---|
| 25 | |
---|
| 26 | </HEAD> |
---|
| 27 | |
---|
| 28 | <BODY BGCOLOR="white" onload="windowTitle();"> |
---|
| 29 | <HR> |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | <!-- ========= START OF TOP NAVBAR ======= --> |
---|
| 33 | <A NAME="navbar_top"><!-- --></A> |
---|
| 34 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
---|
| 35 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 36 | <TR> |
---|
| 37 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 38 | <A NAME="navbar_top_firstrow"><!-- --></A> |
---|
| 39 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 40 | <TR ALIGN="center" VALIGN="top"> |
---|
| 41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 42 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 43 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LBHttpSolrServer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 48 | </TR> |
---|
| 49 | </TABLE> |
---|
| 50 | </TD> |
---|
| 51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 52 | </EM> |
---|
| 53 | </TD> |
---|
| 54 | </TR> |
---|
| 55 | |
---|
| 56 | <TR> |
---|
| 57 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 58 | <A HREF="../../../../../../org/apache/solr/client/solrj/impl/HttpSolrServer.html" title="class in org.apache.solr.client.solrj.impl"><B>PREV CLASS</B></A> |
---|
| 59 | <A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Req.html" title="class in org.apache.solr.client.solrj.impl"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 61 | <A HREF="../../../../../../index.html?org/apache/solr/client/solrj/impl/LBHttpSolrServer.html" target="_top"><B>FRAMES</B></A> |
---|
| 62 | <A HREF="LBHttpSolrServer.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 63 | <SCRIPT type="text/javascript"> |
---|
| 64 | <!-- |
---|
| 65 | if(window==top) { |
---|
| 66 | document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 67 | } |
---|
| 68 | //--> |
---|
| 69 | </SCRIPT> |
---|
| 70 | <NOSCRIPT> |
---|
| 71 | <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 72 | </NOSCRIPT> |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | </FONT></TD> |
---|
| 76 | </TR> |
---|
| 77 | <TR> |
---|
| 78 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 79 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 81 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 82 | </TR> |
---|
| 83 | </TABLE> |
---|
| 84 | <A NAME="skip-navbar_top"></A> |
---|
| 85 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
| 86 | |
---|
| 87 | <HR> |
---|
| 88 | <!-- ======== START OF CLASS DATA ======== --> |
---|
| 89 | <H2> |
---|
| 90 | <FONT SIZE="-1"> |
---|
| 91 | org.apache.solr.client.solrj.impl</FONT> |
---|
| 92 | <BR> |
---|
| 93 | Class LBHttpSolrServer</H2> |
---|
| 94 | <PRE> |
---|
| 95 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
---|
| 96 | <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html" title="class in org.apache.solr.client.solrj">org.apache.solr.client.solrj.SolrServer</A> |
---|
| 97 | <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.solr.client.solrj.impl.LBHttpSolrServer</B> |
---|
| 98 | </PRE> |
---|
| 99 | <DL> |
---|
| 100 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD> |
---|
| 101 | </DL> |
---|
| 102 | <HR> |
---|
| 103 | <DL> |
---|
| 104 | <DT><PRE>public class <B>LBHttpSolrServer</B><DT>extends <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html" title="class in org.apache.solr.client.solrj">SolrServer</A></DL> |
---|
| 105 | </PRE> |
---|
| 106 | |
---|
| 107 | <P> |
---|
| 108 | LBHttpSolrServer or "LoadBalanced HttpSolrServer" is a load balancing wrapper around |
---|
| 109 | <A HREF="../../../../../../org/apache/solr/client/solrj/impl/HttpSolrServer.html" title="class in org.apache.solr.client.solrj.impl"><CODE>HttpSolrServer</CODE></A>. This is useful when you |
---|
| 110 | have multiple SolrServers and the requests need to be Load Balanced among them. This should <b>NOT</b> be used for |
---|
| 111 | indexing. Also see the <a href="http://wiki.apache.org/solr/LBHttpSolrServer">wiki</a> page. |
---|
| 112 | <p/> |
---|
| 113 | It offers automatic failover when a server goes down and it detects when the server comes back up. |
---|
| 114 | <p/> |
---|
| 115 | Load balancing is done using a simple round-robin on the list of servers. |
---|
| 116 | <p/> |
---|
| 117 | If a request to a server fails by an IOException due to a connection timeout or read timeout then the host is taken |
---|
| 118 | off the list of live servers and moved to a 'dead server list' and the request is resent to the next live server. |
---|
| 119 | This process is continued till it tries all the live servers. If atleast one server is alive, the request succeeds, |
---|
| 120 | and if not it fails. |
---|
| 121 | <blockquote><pre> |
---|
| 122 | SolrServer lbHttpSolrServer = new LBHttpSolrServer("http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr"); |
---|
| 123 | //or if you wish to pass the HttpClient do as follows |
---|
| 124 | httpClient httpClient = new HttpClient(); |
---|
| 125 | SolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient,"http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr"); |
---|
| 126 | </pre></blockquote> |
---|
| 127 | This detects if a dead server comes alive automatically. The check is done in fixed intervals in a dedicated thread. |
---|
| 128 | This interval can be set using <A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#setAliveCheckInterval(int)"><CODE>setAliveCheckInterval(int)</CODE></A> , the default is set to one minute. |
---|
| 129 | <p/> |
---|
| 130 | <b>When to use this?</b><br/> This can be used as a software load balancer when you do not wish to setup an external |
---|
| 131 | load balancer. Alternatives to this code are to use |
---|
| 132 | a dedicated hardware load balancer or using Apache httpd with mod_proxy_balancer as a load balancer. See <a |
---|
| 133 | href="http://en.wikipedia.org/wiki/Load_balancing_(computing)">Load balancing on Wikipedia</a> |
---|
| 134 | <P> |
---|
| 135 | |
---|
| 136 | <P> |
---|
| 137 | <DL> |
---|
| 138 | <DT><B>Since:</B></DT> |
---|
| 139 | <DD>solr 1.4</DD> |
---|
| 140 | <DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#org.apache.solr.client.solrj.impl.LBHttpSolrServer">Serialized Form</A></DL> |
---|
| 141 | <HR> |
---|
| 142 | |
---|
| 143 | <P> |
---|
| 144 | <!-- ======== NESTED CLASS SUMMARY ======== --> |
---|
| 145 | |
---|
| 146 | <A NAME="nested_class_summary"><!-- --></A> |
---|
| 147 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 148 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 149 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 150 | <B>Nested Class Summary</B></FONT></TH> |
---|
| 151 | </TR> |
---|
| 152 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 153 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 154 | <CODE>static class</CODE></FONT></TD> |
---|
| 155 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Req.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Req</A></B></CODE> |
---|
| 156 | |
---|
| 157 | <BR> |
---|
| 158 | </TD> |
---|
| 159 | </TR> |
---|
| 160 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 161 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 162 | <CODE>static class</CODE></FONT></TD> |
---|
| 163 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Rsp.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Rsp</A></B></CODE> |
---|
| 164 | |
---|
| 165 | <BR> |
---|
| 166 | </TD> |
---|
| 167 | </TR> |
---|
| 168 | </TABLE> |
---|
| 169 | |
---|
| 170 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
| 171 | |
---|
| 172 | <A NAME="constructor_summary"><!-- --></A> |
---|
| 173 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 174 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 175 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 176 | <B>Constructor Summary</B></FONT></TH> |
---|
| 177 | </TR> |
---|
| 178 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 179 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#LBHttpSolrServer(org.apache.http.client.HttpClient, org.apache.solr.client.solrj.ResponseParser, java.lang.String...)">LBHttpSolrServer</A></B>(org.apache.http.client.HttpClient httpClient, |
---|
| 180 | <A HREF="../../../../../../org/apache/solr/client/solrj/ResponseParser.html" title="class in org.apache.solr.client.solrj">ResponseParser</A> parser, |
---|
| 181 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrl)</CODE> |
---|
| 182 | |
---|
| 183 | <BR> |
---|
| 184 | The provided httpClient should use a multi-threaded connection manager</TD> |
---|
| 185 | </TR> |
---|
| 186 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 187 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#LBHttpSolrServer(org.apache.http.client.HttpClient, java.lang.String...)">LBHttpSolrServer</A></B>(org.apache.http.client.HttpClient httpClient, |
---|
| 188 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrl)</CODE> |
---|
| 189 | |
---|
| 190 | <BR> |
---|
| 191 | The provided httpClient should use a multi-threaded connection manager</TD> |
---|
| 192 | </TR> |
---|
| 193 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 194 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#LBHttpSolrServer(java.lang.String...)">LBHttpSolrServer</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrls)</CODE> |
---|
| 195 | |
---|
| 196 | <BR> |
---|
| 197 | </TD> |
---|
| 198 | </TR> |
---|
| 199 | </TABLE> |
---|
| 200 | |
---|
| 201 | <!-- ========== METHOD SUMMARY =========== --> |
---|
| 202 | |
---|
| 203 | <A NAME="method_summary"><!-- --></A> |
---|
| 204 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 205 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 206 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 207 | <B>Method Summary</B></FONT></TH> |
---|
| 208 | </TR> |
---|
| 209 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 210 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 211 | <CODE> void</CODE></FONT></TD> |
---|
| 212 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#addSolrServer(java.lang.String)">addSolrServer</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</CODE> |
---|
| 213 | |
---|
| 214 | <BR> |
---|
| 215 | </TD> |
---|
| 216 | </TR> |
---|
| 217 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 218 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 219 | <CODE>protected void</CODE></FONT></TD> |
---|
| 220 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#finalize()">finalize</A></B>()</CODE> |
---|
| 221 | |
---|
| 222 | <BR> |
---|
| 223 | </TD> |
---|
| 224 | </TR> |
---|
| 225 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 226 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 227 | <CODE> org.apache.http.client.HttpClient</CODE></FONT></TD> |
---|
| 228 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#getHttpClient()">getHttpClient</A></B>()</CODE> |
---|
| 229 | |
---|
| 230 | <BR> |
---|
| 231 | </TD> |
---|
| 232 | </TR> |
---|
| 233 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 234 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 235 | <CODE>protected <A HREF="../../../../../../org/apache/solr/client/solrj/impl/HttpSolrServer.html" title="class in org.apache.solr.client.solrj.impl">HttpSolrServer</A></CODE></FONT></TD> |
---|
| 236 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#makeServer(java.lang.String)">makeServer</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</CODE> |
---|
| 237 | |
---|
| 238 | <BR> |
---|
| 239 | </TD> |
---|
| 240 | </TR> |
---|
| 241 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 242 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 243 | <CODE>static <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 244 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#normalize(java.lang.String)">normalize</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</CODE> |
---|
| 245 | |
---|
| 246 | <BR> |
---|
| 247 | </TD> |
---|
| 248 | </TR> |
---|
| 249 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 250 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 251 | <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 252 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#removeSolrServer(java.lang.String)">removeSolrServer</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</CODE> |
---|
| 253 | |
---|
| 254 | <BR> |
---|
| 255 | </TD> |
---|
| 256 | </TR> |
---|
| 257 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 258 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 259 | <CODE> <A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Rsp.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Rsp</A></CODE></FONT></TD> |
---|
| 260 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#request(org.apache.solr.client.solrj.impl.LBHttpSolrServer.Req)">request</A></B>(<A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Req.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Req</A> req)</CODE> |
---|
| 261 | |
---|
| 262 | <BR> |
---|
| 263 | Tries to query a live server from the list provided in Req.</TD> |
---|
| 264 | </TR> |
---|
| 265 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 266 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 267 | <CODE> <A HREF="../../../../../../org/apache/solr/common/util/NamedList.html" title="class in org.apache.solr.common.util">NamedList</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> |
---|
| 268 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#request(org.apache.solr.client.solrj.SolrRequest)">request</A></B>(<A HREF="../../../../../../org/apache/solr/client/solrj/SolrRequest.html" title="class in org.apache.solr.client.solrj">SolrRequest</A> request)</CODE> |
---|
| 269 | |
---|
| 270 | <BR> |
---|
| 271 | Tries to query a live server.</TD> |
---|
| 272 | </TR> |
---|
| 273 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 274 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 275 | <CODE> void</CODE></FONT></TD> |
---|
| 276 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#setAliveCheckInterval(int)">setAliveCheckInterval</A></B>(int interval)</CODE> |
---|
| 277 | |
---|
| 278 | <BR> |
---|
| 279 | LBHttpSolrServer keeps pinging the dead servers at fixed interval to find if it is alive.</TD> |
---|
| 280 | </TR> |
---|
| 281 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 282 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 283 | <CODE> void</CODE></FONT></TD> |
---|
| 284 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#setConnectionTimeout(int)">setConnectionTimeout</A></B>(int timeout)</CODE> |
---|
| 285 | |
---|
| 286 | <BR> |
---|
| 287 | </TD> |
---|
| 288 | </TR> |
---|
| 289 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 290 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 291 | <CODE> void</CODE></FONT></TD> |
---|
| 292 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#setSoTimeout(int)">setSoTimeout</A></B>(int timeout)</CODE> |
---|
| 293 | |
---|
| 294 | <BR> |
---|
| 295 | set soTimeout (read timeout) on the underlying HttpConnectionManager.</TD> |
---|
| 296 | </TR> |
---|
| 297 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 298 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 299 | <CODE> void</CODE></FONT></TD> |
---|
| 300 | <TD><CODE><B><A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.html#shutdown()">shutdown</A></B>()</CODE> |
---|
| 301 | |
---|
| 302 | <BR> |
---|
| 303 | Release allocated resources.</TD> |
---|
| 304 | </TR> |
---|
| 305 | </TABLE> |
---|
| 306 | <A NAME="methods_inherited_from_class_org.apache.solr.client.solrj.SolrServer"><!-- --></A> |
---|
| 307 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 308 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 309 | <TH ALIGN="left"><B>Methods inherited from class org.apache.solr.client.solrj.<A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html" title="class in org.apache.solr.client.solrj">SolrServer</A></B></TH> |
---|
| 310 | </TR> |
---|
| 311 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 312 | <TD><CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#add(java.util.Collection)">add</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#add(java.util.Collection, int)">add</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#add(org.apache.solr.common.SolrInputDocument)">add</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#add(org.apache.solr.common.SolrInputDocument, int)">add</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#addBean(java.lang.Object)">addBean</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#addBean(java.lang.Object, int)">addBean</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#addBeans(java.util.Collection)">addBeans</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#addBeans(java.util.Collection, int)">addBeans</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#commit()">commit</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#commit(boolean, boolean)">commit</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#commit(boolean, boolean, boolean)">commit</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteById(java.util.List)">deleteById</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteById(java.util.List, int)">deleteById</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteById(java.lang.String)">deleteById</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteById(java.lang.String, int)">deleteById</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteByQuery(java.lang.String)">deleteByQuery</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#deleteByQuery(java.lang.String, int)">deleteByQuery</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#getBinder()">getBinder</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#optimize()">optimize</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#optimize(boolean, boolean)">optimize</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#optimize(boolean, boolean, int)">optimize</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#ping()">ping</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#query(org.apache.solr.common.params.SolrParams)">query</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#query(org.apache.solr.common.params.SolrParams, org.apache.solr.client.solrj.SolrRequest.METHOD)">query</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#queryAndStreamResponse(org.apache.solr.common.params.SolrParams, org.apache.solr.client.solrj.StreamingResponseCallback)">queryAndStreamResponse</A>, <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#rollback()">rollback</A></CODE></TD> |
---|
| 313 | </TR> |
---|
| 314 | </TABLE> |
---|
| 315 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
| 316 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 317 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 318 | <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
---|
| 319 | </TR> |
---|
| 320 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 321 | <TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
---|
| 322 | </TR> |
---|
| 323 | </TABLE> |
---|
| 324 | |
---|
| 325 | <P> |
---|
| 326 | |
---|
| 327 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
| 328 | |
---|
| 329 | <A NAME="constructor_detail"><!-- --></A> |
---|
| 330 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 331 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 332 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 333 | <B>Constructor Detail</B></FONT></TH> |
---|
| 334 | </TR> |
---|
| 335 | </TABLE> |
---|
| 336 | |
---|
| 337 | <A NAME="LBHttpSolrServer(java.lang.String...)"><!-- --></A><H3> |
---|
| 338 | LBHttpSolrServer</H3> |
---|
| 339 | <PRE> |
---|
| 340 | public <B>LBHttpSolrServer</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrls) |
---|
| 341 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></PRE> |
---|
| 342 | <DL> |
---|
| 343 | <DL> |
---|
| 344 | |
---|
| 345 | <DT><B>Throws:</B> |
---|
| 346 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></CODE></DL> |
---|
| 347 | </DL> |
---|
| 348 | <HR> |
---|
| 349 | |
---|
| 350 | <A NAME="LBHttpSolrServer(org.apache.http.client.HttpClient, java.lang.String...)"><!-- --></A><H3> |
---|
| 351 | LBHttpSolrServer</H3> |
---|
| 352 | <PRE> |
---|
| 353 | public <B>LBHttpSolrServer</B>(org.apache.http.client.HttpClient httpClient, |
---|
| 354 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrl) |
---|
| 355 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></PRE> |
---|
| 356 | <DL> |
---|
| 357 | <DD>The provided httpClient should use a multi-threaded connection manager |
---|
| 358 | <P> |
---|
| 359 | <DL> |
---|
| 360 | |
---|
| 361 | <DT><B>Throws:</B> |
---|
| 362 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></CODE></DL> |
---|
| 363 | </DL> |
---|
| 364 | <HR> |
---|
| 365 | |
---|
| 366 | <A NAME="LBHttpSolrServer(org.apache.http.client.HttpClient, org.apache.solr.client.solrj.ResponseParser, java.lang.String...)"><!-- --></A><H3> |
---|
| 367 | LBHttpSolrServer</H3> |
---|
| 368 | <PRE> |
---|
| 369 | public <B>LBHttpSolrServer</B>(org.apache.http.client.HttpClient httpClient, |
---|
| 370 | <A HREF="../../../../../../org/apache/solr/client/solrj/ResponseParser.html" title="class in org.apache.solr.client.solrj">ResponseParser</A> parser, |
---|
| 371 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>... solrServerUrl) |
---|
| 372 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></PRE> |
---|
| 373 | <DL> |
---|
| 374 | <DD>The provided httpClient should use a multi-threaded connection manager |
---|
| 375 | <P> |
---|
| 376 | <DL> |
---|
| 377 | |
---|
| 378 | <DT><B>Throws:</B> |
---|
| 379 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></CODE></DL> |
---|
| 380 | </DL> |
---|
| 381 | |
---|
| 382 | <!-- ============ METHOD DETAIL ========== --> |
---|
| 383 | |
---|
| 384 | <A NAME="method_detail"><!-- --></A> |
---|
| 385 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 386 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 387 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 388 | <B>Method Detail</B></FONT></TH> |
---|
| 389 | </TR> |
---|
| 390 | </TABLE> |
---|
| 391 | |
---|
| 392 | <A NAME="normalize(java.lang.String)"><!-- --></A><H3> |
---|
| 393 | normalize</H3> |
---|
| 394 | <PRE> |
---|
| 395 | public static <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>normalize</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</PRE> |
---|
| 396 | <DL> |
---|
| 397 | <DD><DL> |
---|
| 398 | </DL> |
---|
| 399 | </DD> |
---|
| 400 | </DL> |
---|
| 401 | <HR> |
---|
| 402 | |
---|
| 403 | <A NAME="makeServer(java.lang.String)"><!-- --></A><H3> |
---|
| 404 | makeServer</H3> |
---|
| 405 | <PRE> |
---|
| 406 | protected <A HREF="../../../../../../org/apache/solr/client/solrj/impl/HttpSolrServer.html" title="class in org.apache.solr.client.solrj.impl">HttpSolrServer</A> <B>makeServer</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server) |
---|
| 407 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></PRE> |
---|
| 408 | <DL> |
---|
| 409 | <DD><DL> |
---|
| 410 | |
---|
| 411 | <DT><B>Throws:</B> |
---|
| 412 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></CODE></DL> |
---|
| 413 | </DD> |
---|
| 414 | </DL> |
---|
| 415 | <HR> |
---|
| 416 | |
---|
| 417 | <A NAME="request(org.apache.solr.client.solrj.impl.LBHttpSolrServer.Req)"><!-- --></A><H3> |
---|
| 418 | request</H3> |
---|
| 419 | <PRE> |
---|
| 420 | public <A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Rsp.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Rsp</A> <B>request</B>(<A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Req.html" title="class in org.apache.solr.client.solrj.impl">LBHttpSolrServer.Req</A> req) |
---|
| 421 | throws <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServerException.html" title="class in org.apache.solr.client.solrj">SolrServerException</A>, |
---|
| 422 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
| 423 | <DL> |
---|
| 424 | <DD>Tries to query a live server from the list provided in Req. Servers in the dead pool are skipped. |
---|
| 425 | If a request fails due to an IOException, the server is moved to the dead pool for a certain period of |
---|
| 426 | time, or until a test request on that server succeeds. |
---|
| 427 | |
---|
| 428 | Servers are queried in the exact order given (except servers currently in the dead pool are skipped). |
---|
| 429 | If no live servers from the provided list remain to be tried, a number of previously skipped dead servers will be tried. |
---|
| 430 | Req.getNumDeadServersToTry() controls how many dead servers will be tried. |
---|
| 431 | |
---|
| 432 | If no live servers are found a SolrServerException is thrown. |
---|
| 433 | <P> |
---|
| 434 | <DD><DL> |
---|
| 435 | <DT><B>Parameters:</B><DD><CODE>req</CODE> - contains both the request as well as the list of servers to query |
---|
| 436 | <DT><B>Returns:</B><DD>the result of the request |
---|
| 437 | <DT><B>Throws:</B> |
---|
| 438 | <DD><CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServerException.html" title="class in org.apache.solr.client.solrj">SolrServerException</A></CODE> |
---|
| 439 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
| 440 | </DD> |
---|
| 441 | </DL> |
---|
| 442 | <HR> |
---|
| 443 | |
---|
| 444 | <A NAME="addSolrServer(java.lang.String)"><!-- --></A><H3> |
---|
| 445 | addSolrServer</H3> |
---|
| 446 | <PRE> |
---|
| 447 | public void <B>addSolrServer</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server) |
---|
| 448 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></PRE> |
---|
| 449 | <DL> |
---|
| 450 | <DD><DL> |
---|
| 451 | |
---|
| 452 | <DT><B>Throws:</B> |
---|
| 453 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</A></CODE></DL> |
---|
| 454 | </DD> |
---|
| 455 | </DL> |
---|
| 456 | <HR> |
---|
| 457 | |
---|
| 458 | <A NAME="removeSolrServer(java.lang.String)"><!-- --></A><H3> |
---|
| 459 | removeSolrServer</H3> |
---|
| 460 | <PRE> |
---|
| 461 | public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>removeSolrServer</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> server)</PRE> |
---|
| 462 | <DL> |
---|
| 463 | <DD><DL> |
---|
| 464 | </DL> |
---|
| 465 | </DD> |
---|
| 466 | </DL> |
---|
| 467 | <HR> |
---|
| 468 | |
---|
| 469 | <A NAME="setConnectionTimeout(int)"><!-- --></A><H3> |
---|
| 470 | setConnectionTimeout</H3> |
---|
| 471 | <PRE> |
---|
| 472 | public void <B>setConnectionTimeout</B>(int timeout)</PRE> |
---|
| 473 | <DL> |
---|
| 474 | <DD><DL> |
---|
| 475 | </DL> |
---|
| 476 | </DD> |
---|
| 477 | </DL> |
---|
| 478 | <HR> |
---|
| 479 | |
---|
| 480 | <A NAME="setSoTimeout(int)"><!-- --></A><H3> |
---|
| 481 | setSoTimeout</H3> |
---|
| 482 | <PRE> |
---|
| 483 | public void <B>setSoTimeout</B>(int timeout)</PRE> |
---|
| 484 | <DL> |
---|
| 485 | <DD>set soTimeout (read timeout) on the underlying HttpConnectionManager. This is desirable for queries, but probably |
---|
| 486 | not for indexing. |
---|
| 487 | <P> |
---|
| 488 | <DD><DL> |
---|
| 489 | </DL> |
---|
| 490 | </DD> |
---|
| 491 | </DL> |
---|
| 492 | <HR> |
---|
| 493 | |
---|
| 494 | <A NAME="shutdown()"><!-- --></A><H3> |
---|
| 495 | shutdown</H3> |
---|
| 496 | <PRE> |
---|
| 497 | public void <B>shutdown</B>()</PRE> |
---|
| 498 | <DL> |
---|
| 499 | <DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#shutdown()">SolrServer</A></CODE></B></DD> |
---|
| 500 | <DD>Release allocated resources. |
---|
| 501 | <P> |
---|
| 502 | <DD><DL> |
---|
| 503 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#shutdown()">shutdown</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html" title="class in org.apache.solr.client.solrj">SolrServer</A></CODE></DL> |
---|
| 504 | </DD> |
---|
| 505 | <DD><DL> |
---|
| 506 | </DL> |
---|
| 507 | </DD> |
---|
| 508 | </DL> |
---|
| 509 | <HR> |
---|
| 510 | |
---|
| 511 | <A NAME="request(org.apache.solr.client.solrj.SolrRequest)"><!-- --></A><H3> |
---|
| 512 | request</H3> |
---|
| 513 | <PRE> |
---|
| 514 | public <A HREF="../../../../../../org/apache/solr/common/util/NamedList.html" title="class in org.apache.solr.common.util">NamedList</A><<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>> <B>request</B>(<A HREF="../../../../../../org/apache/solr/client/solrj/SolrRequest.html" title="class in org.apache.solr.client.solrj">SolrRequest</A> request) |
---|
| 515 | throws <A HREF="../../../../../../org/apache/solr/client/solrj/SolrServerException.html" title="class in org.apache.solr.client.solrj">SolrServerException</A>, |
---|
| 516 | <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
| 517 | <DL> |
---|
| 518 | <DD>Tries to query a live server. A SolrServerException is thrown if all servers are dead. |
---|
| 519 | If the request failed due to IOException then the live server is moved to dead pool and the request is |
---|
| 520 | retried on another live server. After live servers are exhausted, any servers previously marked as dead |
---|
| 521 | will be tried before failing the request. |
---|
| 522 | <P> |
---|
| 523 | <DD><DL> |
---|
| 524 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html#request(org.apache.solr.client.solrj.SolrRequest)">request</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServer.html" title="class in org.apache.solr.client.solrj">SolrServer</A></CODE></DL> |
---|
| 525 | </DD> |
---|
| 526 | <DD><DL> |
---|
| 527 | <DT><B>Parameters:</B><DD><CODE>request</CODE> - the SolrRequest. |
---|
| 528 | <DT><B>Returns:</B><DD>response |
---|
| 529 | <DT><B>Throws:</B> |
---|
| 530 | <DD><CODE><A HREF="../../../../../../org/apache/solr/client/solrj/SolrServerException.html" title="class in org.apache.solr.client.solrj">SolrServerException</A></CODE> |
---|
| 531 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
| 532 | </DD> |
---|
| 533 | </DL> |
---|
| 534 | <HR> |
---|
| 535 | |
---|
| 536 | <A NAME="setAliveCheckInterval(int)"><!-- --></A><H3> |
---|
| 537 | setAliveCheckInterval</H3> |
---|
| 538 | <PRE> |
---|
| 539 | public void <B>setAliveCheckInterval</B>(int interval)</PRE> |
---|
| 540 | <DL> |
---|
| 541 | <DD>LBHttpSolrServer keeps pinging the dead servers at fixed interval to find if it is alive. Use this to set that |
---|
| 542 | interval |
---|
| 543 | <P> |
---|
| 544 | <DD><DL> |
---|
| 545 | <DT><B>Parameters:</B><DD><CODE>interval</CODE> - time in milliseconds</DL> |
---|
| 546 | </DD> |
---|
| 547 | </DL> |
---|
| 548 | <HR> |
---|
| 549 | |
---|
| 550 | <A NAME="getHttpClient()"><!-- --></A><H3> |
---|
| 551 | getHttpClient</H3> |
---|
| 552 | <PRE> |
---|
| 553 | public org.apache.http.client.HttpClient <B>getHttpClient</B>()</PRE> |
---|
| 554 | <DL> |
---|
| 555 | <DD><DL> |
---|
| 556 | </DL> |
---|
| 557 | </DD> |
---|
| 558 | </DL> |
---|
| 559 | <HR> |
---|
| 560 | |
---|
| 561 | <A NAME="finalize()"><!-- --></A><H3> |
---|
| 562 | finalize</H3> |
---|
| 563 | <PRE> |
---|
| 564 | protected void <B>finalize</B>() |
---|
| 565 | throws <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></PRE> |
---|
| 566 | <DL> |
---|
| 567 | <DD><DL> |
---|
| 568 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
---|
| 569 | </DD> |
---|
| 570 | <DD><DL> |
---|
| 571 | |
---|
| 572 | <DT><B>Throws:</B> |
---|
| 573 | <DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></CODE></DL> |
---|
| 574 | </DD> |
---|
| 575 | </DL> |
---|
| 576 | <!-- ========= END OF CLASS DATA ========= --> |
---|
| 577 | <HR> |
---|
| 578 | |
---|
| 579 | |
---|
| 580 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
| 581 | <A NAME="navbar_bottom"><!-- --></A> |
---|
| 582 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
| 583 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 584 | <TR> |
---|
| 585 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 586 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
| 587 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 588 | <TR ALIGN="center" VALIGN="top"> |
---|
| 589 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 590 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 591 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 592 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LBHttpSolrServer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 593 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 594 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 595 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 596 | </TR> |
---|
| 597 | </TABLE> |
---|
| 598 | </TD> |
---|
| 599 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 600 | </EM> |
---|
| 601 | </TD> |
---|
| 602 | </TR> |
---|
| 603 | |
---|
| 604 | <TR> |
---|
| 605 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 606 | <A HREF="../../../../../../org/apache/solr/client/solrj/impl/HttpSolrServer.html" title="class in org.apache.solr.client.solrj.impl"><B>PREV CLASS</B></A> |
---|
| 607 | <A HREF="../../../../../../org/apache/solr/client/solrj/impl/LBHttpSolrServer.Req.html" title="class in org.apache.solr.client.solrj.impl"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 608 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 609 | <A HREF="../../../../../../index.html?org/apache/solr/client/solrj/impl/LBHttpSolrServer.html" target="_top"><B>FRAMES</B></A> |
---|
| 610 | <A HREF="LBHttpSolrServer.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 611 | <SCRIPT type="text/javascript"> |
---|
| 612 | <!-- |
---|
| 613 | if(window==top) { |
---|
| 614 | document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 615 | } |
---|
| 616 | //--> |
---|
| 617 | </SCRIPT> |
---|
| 618 | <NOSCRIPT> |
---|
| 619 | <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 620 | </NOSCRIPT> |
---|
| 621 | |
---|
| 622 | |
---|
| 623 | </FONT></TD> |
---|
| 624 | </TR> |
---|
| 625 | <TR> |
---|
| 626 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 627 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 628 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 629 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 630 | </TR> |
---|
| 631 | </TABLE> |
---|
| 632 | <A NAME="skip-navbar_bottom"></A> |
---|
| 633 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
| 634 | |
---|
| 635 | <HR> |
---|
| 636 | |
---|
| 637 | <address>Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.</address> |
---|
| 638 | <script src='../../../../../../prettify.js' type='text/javascript'></script> |
---|
| 639 | <script type='text/javascript'> |
---|
| 640 | (function(){ |
---|
| 641 | var oldonload = window.onload; |
---|
| 642 | if (typeof oldonload != 'function') { |
---|
| 643 | window.onload = prettyPrint; |
---|
| 644 | } else { |
---|
| 645 | window.onload = function() { |
---|
| 646 | oldonload(); |
---|
| 647 | prettyPrint(); |
---|
| 648 | } |
---|
| 649 | } |
---|
| 650 | })(); |
---|
| 651 | </script> |
---|
| 652 | |
---|
| 653 | </BODY> |
---|
| 654 | </HTML> |
---|