|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.basho.riak.client.http.RiakConfig
public class RiakConfig
Configuration settings for connecting to a Riak instance such as the base Riak URL and HttpClient settings. A pre-constructed HttpClient can also be provided.
Field Summary | |
---|---|
static Pattern |
BASE_URL_PATTERN
|
Constructor Summary | |
---|---|
RiakConfig()
|
|
RiakConfig(String url)
|
|
RiakConfig(String ip,
String port,
String prefix)
|
|
RiakConfig(URL url)
|
Method Summary | |
---|---|
String |
getBaseUrl()
The host and port of the Riak server, which is extracted from the specified Riak URL. |
org.apache.http.client.HttpClient |
getHttpClient()
The pre-constructed HttpClient for a client to use if one was provided |
String |
getMapReducePath()
The path to the Riak map reduce resource, which defaults to /mapred |
String |
getMapReduceUrl()
The full URL of Riak map reduce resource, which is calculated by combining the host and port from the Riak URL and the map reduce path. |
Integer |
getMaxConnections()
|
String |
getPingPath()
|
String |
getPingUrl()
The full URL of the Riak ping resource, which is calculated by combining the host and port from the Riak URL and the ping path. |
org.apache.http.client.HttpRequestRetryHandler |
getRetryHandler()
Get value set for the http client retry handler, the default retry handler for requests. |
String |
getStatsUrl()
The full URL of the Riak status (stats) resource, which is calculated by combining the host and port from the Riak URL and the stats path. |
Integer |
getTimeout()
|
String |
getUrl()
The base URL used by a client to construct object URLs |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Provide a pre-constructed HttpClient for clients to use to connect to Riak |
void |
setMapReducePath(String path)
|
void |
setMaxConnections(Integer maxConnections)
Value to set for the HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS and the HttpConnectionManagerParams.MAX_HOST_CONNECTIONS properties: overall maximum number of connections used by the HttpClient and the maximum number of connections per host. |
void |
setPingPath(String path)
|
void |
setRetryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler)
Value to set for the http client retry handler, the default retry handler for requests. |
void |
setTimeout(Integer timeout)
Value to set for the properties: HttpClientParams#CONNECTION_MANAGER_TIMEOUT ,
HttpClientParams#SO_TIMEOUT ,
HttpConnectionManagerParams#CONNECTION_TIMEOUT which sets the
timeout milliseconds for retrieving an HTTP connection and data over the
connection. |
void |
setUrl(String url)
Set the base URL that clients should use to construct object URLs (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Pattern BASE_URL_PATTERN
Constructor Detail |
---|
public RiakConfig()
public RiakConfig(String url)
public RiakConfig(URL url)
public RiakConfig(String ip, String port, String prefix)
Method Detail |
---|
public String getUrl()
public void setUrl(String url)
public String getMapReduceUrl()
public String getPingUrl()
public String getStatsUrl()
public String getBaseUrl()
public String getMapReducePath()
public void setMapReducePath(String path)
public String getPingPath()
public void setPingPath(String path)
public org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
public void setTimeout(Integer timeout)
HttpClientParams#CONNECTION_MANAGER_TIMEOUT
,
HttpClientParams#SO_TIMEOUT
,
HttpConnectionManagerParams#CONNECTION_TIMEOUT
which sets the
timeout milliseconds for retrieving an HTTP connection and data over the
connection. Null for default.
public Integer getTimeout()
public void setMaxConnections(Integer maxConnections)
public Integer getMaxConnections()
public org.apache.http.client.HttpRequestRetryHandler getRetryHandler()
HttpRequestRetryHandler
,
DefaultHttpRequestRetryHandler
public void setRetryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler)
HttpRequestRetryHandler
,
DefaultHttpRequestRetryHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |