Package org.elasticsearch.transport
Class ConnectionProfile.Builder
java.lang.Object
org.elasticsearch.transport.ConnectionProfile.Builder
- Enclosing class:
- ConnectionProfile
A builder to build a new 
ConnectionProfile- 
Constructor SummaryConstructorsConstructorDescriptionBuilder()create an empty builderBuilder(ConnectionProfile source)copy constructor, using another profile as a base
- 
Method SummaryModifier and TypeMethodDescriptionaddConnections(int numConnections, TransportRequestOptions.Type... types)Adds a number of connections for one or more types.build()Creates a newConnectionProfilebased on the added connections.setCompressionEnabled(Compression.Enabled compressionEnabled)Sets compression enabled configuration for this connection profilesetCompressionScheme(Compression.Scheme compressionScheme)Sets compression scheme for this connection profilesetConnectTimeout(org.elasticsearch.core.TimeValue connectTimeout)Sets a connect timeout for this connection profilesetHandshakeTimeout(org.elasticsearch.core.TimeValue handshakeTimeout)Sets a handshake timeout for this connection profilesetPingInterval(org.elasticsearch.core.TimeValue pingInterval)Sets a ping interval for this connection profile
- 
Constructor Details- 
Builderpublic Builder()create an empty builder
- 
Buildercopy constructor, using another profile as a base
 
- 
- 
Method Details- 
setConnectTimeoutpublic ConnectionProfile.Builder setConnectTimeout(org.elasticsearch.core.TimeValue connectTimeout)Sets a connect timeout for this connection profile
- 
setHandshakeTimeoutpublic ConnectionProfile.Builder setHandshakeTimeout(org.elasticsearch.core.TimeValue handshakeTimeout)Sets a handshake timeout for this connection profile
- 
setPingIntervalSets a ping interval for this connection profile
- 
setCompressionEnabledSets compression enabled configuration for this connection profile
- 
setCompressionSchemeSets compression scheme for this connection profile
- 
addConnectionspublic ConnectionProfile.Builder addConnections(int numConnections, TransportRequestOptions.Type... types)Adds a number of connections for one or more types. Each type can only be added once.- Parameters:
- numConnections- the number of connections to use in the pool for the given connection types
- types- a set of types that should share the given number of connections
 
- 
buildCreates a newConnectionProfilebased on the added connections.- Throws:
- IllegalStateException- if any of the- TransportRequestOptions.Typeenum is missing
 
 
-