Package com.microsoft.azure.kusto.data
Class HttpClientProperties
- java.lang.Object
-
- com.microsoft.azure.kusto.data.HttpClientProperties
-
public class HttpClientProperties extends Object
HTTP client properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpClientProperties.HttpClientPropertiesBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpClientProperties.HttpClientPropertiesBuilderbuilder()Instantiates a new builder.org.apache.http.HttpHostgetProxy()The proxy to use when connecting to the remote server.booleanisKeepAlive()Indicates whether or not a custom connection keep-alive time should be used.IntegermaxConnectionRoute()The maximum number of connections the client may keep open at the same time per route.IntegermaxConnectionTotal()The maximum number of connections the client may keep open at the same time across all routes.IntegermaxIdleTime()The maximum time persistent connections can stay idle while kept alive in the connection pool.IntegermaxKeepAliveTime()The time a connection can remain idle as part of the keep-alive strategy.
-
-
-
Method Detail
-
builder
public static HttpClientProperties.HttpClientPropertiesBuilder builder()
Instantiates a new builder.- Returns:
- a new HttpClientProperties.HttpClientPropertiesBuilder
-
maxIdleTime
public Integer maxIdleTime()
The maximum time persistent connections can stay idle while kept alive in the connection pool. Connections whose inactivity period exceeds this value will get closed and evicted from the pool.- Returns:
- the maximum idle time expressed in seconds
-
isKeepAlive
public boolean isKeepAlive()
Indicates whether or not a custom connection keep-alive time should be used. If set tofalse, the HTTP client will use the default connection keep-alive strategy, which is to use only the server instructions (if any) set in theKeep-Aliveresponse header. If set totrue, the HTTP client will use a custom connection keep-alive strategy which uses the server instructions set in theKeep-Aliveresponse header; if the response doesn't contain aKeep-Aliveheader, the client will use a default keep-alive period indicated by maxKeepAliveTime().- Returns:
- whether or not a custom connection keep-alive strategy should be used
- See Also:
maxKeepAliveTime(), Keep-Alive
-
maxKeepAliveTime
public Integer maxKeepAliveTime()
The time a connection can remain idle as part of the keep-alive strategy. This value is only used if isKeepAlive() is set totrue. Defaults to 2 minutes.- Returns:
- the maximum custom keep-alive time expressed in seconds
-
maxConnectionTotal
public Integer maxConnectionTotal()
The maximum number of connections the client may keep open at the same time across all routes.- Returns:
- the maximum number of connections
-
maxConnectionRoute
public Integer maxConnectionRoute()
The maximum number of connections the client may keep open at the same time per route.- Returns:
- the maximum number of connections per route
-
getProxy
public org.apache.http.HttpHost getProxy()
The proxy to use when connecting to the remote server.- Returns:
- the proxy
-
-