Interface ConfigurationChildBuilder
- All Known Implementing Classes:
AbstractConfigurationChildBuilder
,AbstractSecurityConfigurationChildBuilder
,AuthenticationConfigurationBuilder
,ClusterConfigurationBuilder
,ConfigurationBuilder
,ConnectionPoolConfigurationBuilder
,ExecutorFactoryConfigurationBuilder
,NearCacheConfigurationBuilder
,SecurityConfigurationBuilder
,ServerConfigurationBuilder
,SslConfigurationBuilder
,StatisticsConfigurationBuilder
,TransactionConfigurationBuilder
public interface ConfigurationChildBuilder
ConfigurationChildBuilder.
- Since:
- 5.3
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionaddCluster
(String clusterName) Adds a new remote server clusteraddContextInitializer
(String contextInitializer) Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.addContextInitializer
(org.infinispan.protostream.SerializationContextInitializer contextInitializer) Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.addContextInitializers
(org.infinispan.protostream.SerializationContextInitializer... contextInitializers) Convenience method to supply multipleSerializationContextInitializer
implementations.addJavaSerialAllowList
(String... regEx) List of regular expressions for classes that can be deserialized using standard Java deserialization when reading data that might have been stored with a different endpoint, e.g.addJavaSerialWhiteList
(String... regEx) Deprecated, for removal: This API element is subject to removal in a future version.Adds a new remote serveraddServers
(String servers) Adds a list of remote servers in the form: host1[:port][;host2[:port]]...Configuration for the executor service used for asynchronous work on the Transport, including asynchronous marshalling and Cache 'async operations' such as Cache.putAsync().balancingStrategy
(Class<? extends FailoverRequestBalancingStrategy> balancingStrategy) For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.balancingStrategy
(String balancingStrategy) For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.balancingStrategy
(Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory) For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.batchSize
(int batchSize) Sets the batch size of internal iterators (ie.build()
Builds a configuration objectclientIntelligence
(ClientIntelligence clientIntelligence) Specifies the level of "intelligence" the client should haveConfigures the connection poolconnectionTimeout
(int connectionTimeout) This property defines the maximum socket connect timeout in milliseconds before giving up connecting to the server.consistentHashImpl
(int version, Class<? extends org.infinispan.client.hotrod.impl.consistenthash.ConsistentHash> consistentHashClass) Defines theConsistentHash
implementation to use for the specified version.consistentHashImpl
(int version, String consistentHashClass) Defines theConsistentHash
implementation to use for the specified version.dnsResolverMaxTTL
(int maxTTL) dnsResolverMinTTL
(int minTTL) dnsResolverNegativeTTL
(int negativeTTL) forceReturnValues
(boolean forceReturnValues) Whether or not to implicitly FORCE_RETURN_VALUE for all calls.keySizeEstimate
(int keySizeEstimate) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, does nothing and will be removed in 15.0marshaller
(Class<? extends Marshaller> marshaller) Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects.marshaller
(String marshaller) Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects.marshaller
(Marshaller marshaller) Allows you to specify an instance ofMarshaller
to serialize and deserialize user objects.maxRetries
(int maxRetries) It sets the maximum number of retries for each request.remoteCache
(String name) Per-cache configurationsecurity()
Security ConfigurationserverFailureTimeout
(int timeoutInMilliseconds) The time for a failed server to be cleared allowing for it to attempt to reconnect at a later point.socketTimeout
(int socketTimeout) This property defines the maximum socket read timeout in milliseconds before giving up waiting for bytes from the server.Configures client-side statistics.tcpKeepAlive
(boolean keepAlive) Affects TCP KEEPALIVE on the TCP stack.tcpNoDelay
(boolean tcpNoDelay) Affects TCP NODELAY on the TCP stack.Transaction configurationtransactionTimeout
(long timeout, TimeUnit timeUnit) Sets the transaction's timeout.transportFactory
(TransportFactory transportFactory) Set the TransportFactory.Configures this builder using the specified URI.Configures this builder using the specified URI.valueSizeEstimate
(int valueSizeEstimate) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, does nothing and will be removed in 15.0version
(ProtocolVersion protocolVersion) This property defines the protocol version that this client should use.withProperties
(Properties properties) Configures this builder using the specified properties.
-
Method Details
-
addServer
ServerConfigurationBuilder addServer()Adds a new remote server -
addCluster
Adds a new remote server cluster -
addServers
Adds a list of remote servers in the form: host1[:port][;host2[:port]]... -
asyncExecutorFactory
ExecutorFactoryConfigurationBuilder asyncExecutorFactory()Configuration for the executor service used for asynchronous work on the Transport, including asynchronous marshalling and Cache 'async operations' such as Cache.putAsync(). -
balancingStrategy
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy. -
balancingStrategy
ConfigurationBuilder balancingStrategy(Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory) For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy. -
balancingStrategy
ConfigurationBuilder balancingStrategy(Class<? extends FailoverRequestBalancingStrategy> balancingStrategy) For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy. -
clientIntelligence
Specifies the level of "intelligence" the client should have -
connectionPool
ConnectionPoolConfigurationBuilder connectionPool()Configures the connection pool -
connectionTimeout
This property defines the maximum socket connect timeout in milliseconds before giving up connecting to the server. Defaults toConfigurationProperties.DEFAULT_CONNECT_TIMEOUT
-
consistentHashImpl
ConfigurationBuilder consistentHashImpl(int version, Class<? extends org.infinispan.client.hotrod.impl.consistenthash.ConsistentHash> consistentHashClass) Defines theConsistentHash
implementation to use for the specified version. By default,ConsistentHashV2
is used for version 1 andConsistentHashV2
is used for version 2. -
consistentHashImpl
Defines theConsistentHash
implementation to use for the specified version. By default,ConsistentHashV2
is used for version 1 andConsistentHashV2
is used for version 2. -
dnsResolverMinTTL
-
dnsResolverMaxTTL
-
dnsResolverNegativeTTL
-
forceReturnValues
Whether or not to implicitly FORCE_RETURN_VALUE for all calls. -
keySizeEstimate
@Deprecated(forRemoval=true, since="12.0") ConfigurationBuilder keySizeEstimate(int keySizeEstimate) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, does nothing and will be removed in 15.0 -
marshaller
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects. This method is mutually exclusive withmarshaller(Marshaller)
. -
marshaller
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects. This method is mutually exclusive withmarshaller(Marshaller)
. -
marshaller
Allows you to specify an instance ofMarshaller
to serialize and deserialize user objects. This method is mutually exclusive withmarshaller(Class)
. -
addContextInitializer
Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
. -
addContextInitializer
ConfigurationBuilder addContextInitializer(org.infinispan.protostream.SerializationContextInitializer contextInitializer) Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
. -
addContextInitializers
ConfigurationBuilder addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... contextInitializers) Convenience method to supply multipleSerializationContextInitializer
implementations. -
version
This property defines the protocol version that this client should use. Defaults to the latest protocol version supported by this client. -
socketTimeout
This property defines the maximum socket read timeout in milliseconds before giving up waiting for bytes from the server. Defaults toConfigurationProperties.DEFAULT_SO_TIMEOUT
-
security
SecurityConfigurationBuilder security()Security Configuration -
tcpNoDelay
Affects TCP NODELAY on the TCP stack. Defaults to enabled -
tcpKeepAlive
Affects TCP KEEPALIVE on the TCP stack. Defaults to disable -
uri
Configures this builder using the specified URI. -
uri
Configures this builder using the specified URI. -
valueSizeEstimate
@Deprecated(forRemoval=true, since="12.0") ConfigurationBuilder valueSizeEstimate(int valueSizeEstimate) Deprecated, for removal: This API element is subject to removal in a future version.Since 12.0, does nothing and will be removed in 15.0 -
maxRetries
It sets the maximum number of retries for each request. A valid value should be greater or equals than 0 (zero). Zero means no retry will made in case of a network failure. It defaults to 10. -
serverFailureTimeout
The time for a failed server to be cleared allowing for it to attempt to reconnect at a later point.If the value is less than or equal to 0 it will be disabled, meaning a failed server will not be reconnected to until all configured servers have failed or a topology update (
ClientIntelligence.TOPOLOGY_AWARE
andClientIntelligence.HASH_DISTRIBUTION_AWARE
only)- Parameters:
timeoutInMilliseconds
- the timeout to attempt to clear a failed server in milliseconds- Returns:
- this builder
-
addJavaSerialAllowList
List of regular expressions for classes that can be deserialized using standard Java deserialization when reading data that might have been stored with a different endpoint, e.g. REST. -
addJavaSerialWhiteList
@Deprecated(forRemoval=true, since="12.0") ConfigurationBuilder addJavaSerialWhiteList(String... regEx) Deprecated, for removal: This API element is subject to removal in a future version.UseaddJavaSerialAllowList(String...)
instead. To be removed in 14.0. -
batchSize
Sets the batch size of internal iterators (ie.keySet().iterator()
. Defaults to 10_000- Parameters:
batchSize
- the batch size to set- Returns:
- this configuration builder with the batch size set
-
statistics
StatisticsConfigurationBuilder statistics()Configures client-side statistics. -
transaction
TransactionConfigurationBuilder transaction()Transaction configuration -
remoteCache
Per-cache configuration- Parameters:
name
- the name of the cache to which specific configuration should be applied. You may use wildcard globbing (e.g.cache-*
) which will apply to any cache that matches.- Returns:
- the
RemoteCacheConfigurationBuilder
for the cache
-
transactionTimeout
Sets the transaction's timeout.This timeout is used by the server to rollback unrecoverable transaction when they are idle for this amount of time.
An unrecoverable transaction are transaction enlisted as
Synchronization
(TransactionMode.NON_XA
) orXAResource
without recovery enabled (TransactionMode.NON_DURABLE_XA
).For
XAResource
, this value is overwritten byXAResource.setTransactionTimeout(int)
.It defaults to 1 minute.
-
transportFactory
Set the TransportFactory. It defaults toDefaultTransportFactory
- Parameters:
transportFactory
- an instance ofTransportFactory
-
withProperties
Configures this builder using the specified properties. SeeConfigurationBuilder
for a list. -
build
Configuration build()Builds a configuration object
-
addJavaSerialAllowList(String...)
instead.