public static class ConnectionProfile.Builder
extends java.lang.Object
ConnectionProfile
Constructor | Description |
---|---|
Builder() |
create an empty builder
|
Builder(ConnectionProfile source) |
copy constructor, using another profile as a base
|
Modifier and Type | Method | Description |
---|---|---|
void |
addConnections(int numConnections,
TransportRequestOptions.Type... types) |
Adds a number of connections for one or more types.
|
ConnectionProfile |
build() |
Creates a new
ConnectionProfile based on the added connections. |
void |
setConnectTimeout(TimeValue connectTimeout) |
Sets a connect timeout for this connection profile
|
void |
setHandshakeTimeout(TimeValue handshakeTimeout) |
Sets a handshake timeout for this connection profile
|
public Builder()
public Builder(ConnectionProfile source)
public void setConnectTimeout(TimeValue connectTimeout)
public void setHandshakeTimeout(TimeValue handshakeTimeout)
public void addConnections(int numConnections, TransportRequestOptions.Type... types)
numConnections
- the number of connections to use in the pool for the given connection typestypes
- a set of types that should share the given number of connectionspublic ConnectionProfile build()
ConnectionProfile
based on the added connections.java.lang.IllegalStateException
- if any of the TransportRequestOptions.Type
enum is missing