Class AbstractConfigurationChildBuilder
- java.lang.Object
-
- org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
-
- All Implemented Interfaces:
ConfigurationChildBuilder
- Direct Known Subclasses:
AbstractSecurityConfigurationChildBuilder
,ClusterConfigurationBuilder
,ConnectionPoolConfigurationBuilder
,ExecutorFactoryConfigurationBuilder
,NearCacheConfigurationBuilder
,SecurityConfigurationBuilder
,ServerConfigurationBuilder
,StatisticsConfigurationBuilder
,TransactionConfigurationBuilder
public abstract class AbstractConfigurationChildBuilder extends Object implements ConfigurationChildBuilder
AbstractConfigurationChildBuilder.- Since:
- 5.3
- Author:
- Tristan Tarrant
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractConfigurationChildBuilder(ConfigurationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ClusterConfigurationBuilder
addCluster(String clusterName)
Adds a new remote server clusterConfigurationBuilder
addContextInitializer(String contextInitializer)
Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.ConfigurationBuilder
addContextInitializer(org.infinispan.protostream.SerializationContextInitializer contextInitializer)
Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.ConfigurationBuilder
addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... contextInitializers)
Convenience method to supply multipleSerializationContextInitializer
implementations.ConfigurationBuilder
addJavaSerialAllowList(String... regExs)
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.ConfigurationBuilder
addJavaSerialWhiteList(String... regExs)
Deprecated.ServerConfigurationBuilder
addServer()
Adds a new remote serverConfigurationBuilder
addServers(String servers)
Adds a list of remote servers in the form: host1[:port][;host2[:port]]...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().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.ConfigurationBuilder
balancingStrategy(String balancingStrategy)
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.ConfigurationBuilder
balancingStrategy(Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory)
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.ConfigurationBuilder
batchSize(int batchSize)
Sets the batch size of internal iterators (ie.Configuration
build()
Builds a configuration objectConfigurationBuilder
classLoader(ClassLoader classLoader)
Specifies theClassLoader
used to find certain resources used by configuration when specified by name (e.g.ConfigurationBuilder
clientIntelligence(ClientIntelligence clientIntelligence)
Specifies the level of "intelligence" the client should haveConnectionPoolConfigurationBuilder
connectionPool()
Configures the connection poolConfigurationBuilder
connectionTimeout(int connectionTimeout)
This property defines the maximum socket connect timeout in milliseconds before giving up connecting to the server.ConfigurationBuilder
consistentHashImpl(int version, Class<? extends org.infinispan.client.hotrod.impl.consistenthash.ConsistentHash> consistentHashClass)
Defines theConsistentHash
implementation to use for the specified version.ConfigurationBuilder
consistentHashImpl(int version, String consistentHashClass)
Defines theConsistentHash
implementation to use for the specified version.ConfigurationBuilder
forceReturnValues(boolean forceReturnValues)
Whether or not to implicitly FORCE_RETURN_VALUE for all calls.ConfigurationBuilder
keySizeEstimate(int keySizeEstimate)
Deprecated.Since 12.0, does nothing and will be removed in 15.0ConfigurationBuilder
marshaller(Class<? extends Marshaller> marshaller)
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects.ConfigurationBuilder
marshaller(String marshaller)
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects.ConfigurationBuilder
marshaller(Marshaller marshaller)
Allows you to specify an instance ofMarshaller
to serialize and deserialize user objects.ConfigurationBuilder
maxRetries(int retriesPerServer)
It sets the maximum number of retries for each request.ConfigurationBuilder
protocolVersion(String protocolVersion)
Deprecated.Useversion(ProtocolVersion)
instead.RemoteCacheConfigurationBuilder
remoteCache(String name)
Per-cache configurationSecurityConfigurationBuilder
security()
Security ConfigurationConfigurationBuilder
socketTimeout(int socketTimeout)
This property defines the maximum socket read timeout in milliseconds before giving up waiting for bytes from the server.StatisticsConfigurationBuilder
statistics()
Configures client-side statistics.ConfigurationBuilder
tcpKeepAlive(boolean tcpKeepAlive)
Affects TCP KEEPALIVE on the TCP stack.ConfigurationBuilder
tcpNoDelay(boolean tcpNoDelay)
Affects TCP NODELAY on the TCP stack.TransactionConfigurationBuilder
transaction()
Transaction configurationConfigurationBuilder
transactionTimeout(long timeout, TimeUnit timeUnit)
Sets the transaction's timeout.ConfigurationBuilder
transportFactory(TransportFactory transportFactory)
Set the TransportFactory.ConfigurationBuilder
uri(String uri)
Configures this builder using the specified URI.ConfigurationBuilder
uri(URI uri)
Configures this builder using the specified URI.ConfigurationBuilder
valueSizeEstimate(int valueSizeEstimate)
Deprecated.Since 12.0, does nothing and will be removed in 15.0ConfigurationBuilder
version(ProtocolVersion protocolVersion)
This property defines the protocol version that this client should use.ConfigurationBuilder
withProperties(Properties properties)
Configures this builder using the specified properties.
-
-
-
Constructor Detail
-
AbstractConfigurationChildBuilder
protected AbstractConfigurationChildBuilder(ConfigurationBuilder builder)
-
-
Method Detail
-
addServer
public ServerConfigurationBuilder addServer()
Description copied from interface:ConfigurationChildBuilder
Adds a new remote server- Specified by:
addServer
in interfaceConfigurationChildBuilder
-
addCluster
public ClusterConfigurationBuilder addCluster(String clusterName)
Description copied from interface:ConfigurationChildBuilder
Adds a new remote server cluster- Specified by:
addCluster
in interfaceConfigurationChildBuilder
-
addServers
public ConfigurationBuilder addServers(String servers)
Description copied from interface:ConfigurationChildBuilder
Adds a list of remote servers in the form: host1[:port][;host2[:port]]...- Specified by:
addServers
in interfaceConfigurationChildBuilder
-
asyncExecutorFactory
public ExecutorFactoryConfigurationBuilder asyncExecutorFactory()
Description copied from interface:ConfigurationChildBuilder
Configuration for the executor service used for asynchronous work on the Transport, including asynchronous marshalling and Cache 'async operations' such as Cache.putAsync().- Specified by:
asyncExecutorFactory
in interfaceConfigurationChildBuilder
-
balancingStrategy
public ConfigurationBuilder balancingStrategy(String balancingStrategy)
Description copied from interface:ConfigurationChildBuilder
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.- Specified by:
balancingStrategy
in interfaceConfigurationChildBuilder
-
balancingStrategy
public ConfigurationBuilder balancingStrategy(Class<? extends FailoverRequestBalancingStrategy> balancingStrategy)
Description copied from interface:ConfigurationChildBuilder
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.- Specified by:
balancingStrategy
in interfaceConfigurationChildBuilder
-
balancingStrategy
public ConfigurationBuilder balancingStrategy(Supplier<FailoverRequestBalancingStrategy> balancingStrategyFactory)
Description copied from interface:ConfigurationChildBuilder
For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.- Specified by:
balancingStrategy
in interfaceConfigurationChildBuilder
-
classLoader
public ConfigurationBuilder classLoader(ClassLoader classLoader)
Description copied from interface:ConfigurationChildBuilder
Specifies theClassLoader
used to find certain resources used by configuration when specified by name (e.g. certificate stores). Infinispan will search through the classloader which loaded this class, the system classloader and the TCCL classloader.- Specified by:
classLoader
in interfaceConfigurationChildBuilder
-
clientIntelligence
public ConfigurationBuilder clientIntelligence(ClientIntelligence clientIntelligence)
Description copied from interface:ConfigurationChildBuilder
Specifies the level of "intelligence" the client should have- Specified by:
clientIntelligence
in interfaceConfigurationChildBuilder
-
connectionPool
public ConnectionPoolConfigurationBuilder connectionPool()
Description copied from interface:ConfigurationChildBuilder
Configures the connection pool- Specified by:
connectionPool
in interfaceConfigurationChildBuilder
-
connectionTimeout
public ConfigurationBuilder connectionTimeout(int connectionTimeout)
Description copied from interface:ConfigurationChildBuilder
This property defines the maximum socket connect timeout in milliseconds before giving up connecting to the server.- Specified by:
connectionTimeout
in interfaceConfigurationChildBuilder
-
consistentHashImpl
public ConfigurationBuilder consistentHashImpl(int version, Class<? extends org.infinispan.client.hotrod.impl.consistenthash.ConsistentHash> consistentHashClass)
Description copied from interface:ConfigurationChildBuilder
Defines theConsistentHash
implementation to use for the specified version. By default,ConsistentHashV2
is used for version 1 andConsistentHashV2
is used for version 2.- Specified by:
consistentHashImpl
in interfaceConfigurationChildBuilder
-
consistentHashImpl
public ConfigurationBuilder consistentHashImpl(int version, String consistentHashClass)
Description copied from interface:ConfigurationChildBuilder
Defines theConsistentHash
implementation to use for the specified version. By default,ConsistentHashV2
is used for version 1 andConsistentHashV2
is used for version 2.- Specified by:
consistentHashImpl
in interfaceConfigurationChildBuilder
-
forceReturnValues
public ConfigurationBuilder forceReturnValues(boolean forceReturnValues)
Description copied from interface:ConfigurationChildBuilder
Whether or not to implicitly FORCE_RETURN_VALUE for all calls.- Specified by:
forceReturnValues
in interfaceConfigurationChildBuilder
-
keySizeEstimate
@Deprecated public ConfigurationBuilder keySizeEstimate(int keySizeEstimate)
Deprecated.Since 12.0, does nothing and will be removed in 15.0- Specified by:
keySizeEstimate
in interfaceConfigurationChildBuilder
-
marshaller
public ConfigurationBuilder marshaller(String marshaller)
Description copied from interface:ConfigurationChildBuilder
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects. This method is mutually exclusive withConfigurationChildBuilder.marshaller(Marshaller)
.- Specified by:
marshaller
in interfaceConfigurationChildBuilder
-
marshaller
public ConfigurationBuilder marshaller(Class<? extends Marshaller> marshaller)
Description copied from interface:ConfigurationChildBuilder
Allows you to specify a customMarshaller
implementation to serialize and deserialize user objects. This method is mutually exclusive withConfigurationChildBuilder.marshaller(Marshaller)
.- Specified by:
marshaller
in interfaceConfigurationChildBuilder
-
marshaller
public ConfigurationBuilder marshaller(Marshaller marshaller)
Description copied from interface:ConfigurationChildBuilder
Allows you to specify an instance ofMarshaller
to serialize and deserialize user objects. This method is mutually exclusive withConfigurationChildBuilder.marshaller(Class)
.- Specified by:
marshaller
in interfaceConfigurationChildBuilder
-
addContextInitializer
public ConfigurationBuilder addContextInitializer(String contextInitializer)
Description copied from interface:ConfigurationChildBuilder
Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.- Specified by:
addContextInitializer
in interfaceConfigurationChildBuilder
-
addContextInitializer
public ConfigurationBuilder addContextInitializer(org.infinispan.protostream.SerializationContextInitializer contextInitializer)
Description copied from interface:ConfigurationChildBuilder
Supply aSerializationContextInitializer
implementation to register classes with theProtoStreamMarshaller
'sSerializationContext
.- Specified by:
addContextInitializer
in interfaceConfigurationChildBuilder
-
addContextInitializers
public ConfigurationBuilder addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... contextInitializers)
Description copied from interface:ConfigurationChildBuilder
Convenience method to supply multipleSerializationContextInitializer
implementations.- Specified by:
addContextInitializers
in interfaceConfigurationChildBuilder
-
protocolVersion
@Deprecated public ConfigurationBuilder protocolVersion(String protocolVersion)
Deprecated.Useversion(ProtocolVersion)
instead.Description copied from interface:ConfigurationChildBuilder
This property defines the protocol version that this client should use. Defaults to the latest protocol version supported by this client.- Specified by:
protocolVersion
in interfaceConfigurationChildBuilder
-
version
public ConfigurationBuilder version(ProtocolVersion protocolVersion)
Description copied from interface:ConfigurationChildBuilder
This property defines the protocol version that this client should use. Defaults to the latest protocol version supported by this client.- Specified by:
version
in interfaceConfigurationChildBuilder
-
socketTimeout
public ConfigurationBuilder socketTimeout(int socketTimeout)
Description copied from interface:ConfigurationChildBuilder
This property defines the maximum socket read timeout in milliseconds before giving up waiting for bytes from the server. Defaults to 60000 (1 minute)- Specified by:
socketTimeout
in interfaceConfigurationChildBuilder
-
security
public SecurityConfigurationBuilder security()
Description copied from interface:ConfigurationChildBuilder
Security Configuration- Specified by:
security
in interfaceConfigurationChildBuilder
-
tcpNoDelay
public ConfigurationBuilder tcpNoDelay(boolean tcpNoDelay)
Description copied from interface:ConfigurationChildBuilder
Affects TCP NODELAY on the TCP stack. Defaults to enabled- Specified by:
tcpNoDelay
in interfaceConfigurationChildBuilder
-
tcpKeepAlive
public ConfigurationBuilder tcpKeepAlive(boolean tcpKeepAlive)
Description copied from interface:ConfigurationChildBuilder
Affects TCP KEEPALIVE on the TCP stack. Defaults to disable- Specified by:
tcpKeepAlive
in interfaceConfigurationChildBuilder
-
valueSizeEstimate
@Deprecated public ConfigurationBuilder valueSizeEstimate(int valueSizeEstimate)
Deprecated.Since 12.0, does nothing and will be removed in 15.0- Specified by:
valueSizeEstimate
in interfaceConfigurationChildBuilder
-
maxRetries
public ConfigurationBuilder maxRetries(int retriesPerServer)
Description copied from interface:ConfigurationChildBuilder
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.- Specified by:
maxRetries
in interfaceConfigurationChildBuilder
-
addJavaSerialAllowList
public ConfigurationBuilder addJavaSerialAllowList(String... regExs)
Description copied from interface:ConfigurationChildBuilder
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.- Specified by:
addJavaSerialAllowList
in interfaceConfigurationChildBuilder
-
addJavaSerialWhiteList
@Deprecated public ConfigurationBuilder addJavaSerialWhiteList(String... regExs)
Deprecated.- Specified by:
addJavaSerialWhiteList
in interfaceConfigurationChildBuilder
-
batchSize
public ConfigurationBuilder batchSize(int batchSize)
Description copied from interface:ConfigurationChildBuilder
Sets the batch size of internal iterators (ie.keySet().iterator()
. Defaults to 10_000- Specified by:
batchSize
in interfaceConfigurationChildBuilder
- Parameters:
batchSize
- the batch size to set- Returns:
- this configuration builder with the batch size set
-
statistics
public StatisticsConfigurationBuilder statistics()
Description copied from interface:ConfigurationChildBuilder
Configures client-side statistics.- Specified by:
statistics
in interfaceConfigurationChildBuilder
-
transaction
public TransactionConfigurationBuilder transaction()
Description copied from interface:ConfigurationChildBuilder
Transaction configuration- Specified by:
transaction
in interfaceConfigurationChildBuilder
-
remoteCache
public RemoteCacheConfigurationBuilder remoteCache(String name)
Description copied from interface:ConfigurationChildBuilder
Per-cache configuration- Specified by:
remoteCache
in interfaceConfigurationChildBuilder
- 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
public ConfigurationBuilder transactionTimeout(long timeout, TimeUnit timeUnit)
Description copied from interface:ConfigurationChildBuilder
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.
- Specified by:
transactionTimeout
in interfaceConfigurationChildBuilder
-
transportFactory
public ConfigurationBuilder transportFactory(TransportFactory transportFactory)
Description copied from interface:ConfigurationChildBuilder
Set the TransportFactory. It defaults toDefaultTransportFactory
- Specified by:
transportFactory
in interfaceConfigurationChildBuilder
- Parameters:
transportFactory
- an instance ofTransportFactory
-
uri
public ConfigurationBuilder uri(URI uri)
Description copied from interface:ConfigurationChildBuilder
Configures this builder using the specified URI.- Specified by:
uri
in interfaceConfigurationChildBuilder
-
uri
public ConfigurationBuilder uri(String uri)
Description copied from interface:ConfigurationChildBuilder
Configures this builder using the specified URI.- Specified by:
uri
in interfaceConfigurationChildBuilder
-
withProperties
public ConfigurationBuilder withProperties(Properties properties)
Description copied from interface:ConfigurationChildBuilder
Configures this builder using the specified properties. SeeConfigurationBuilder
for a list.- Specified by:
withProperties
in interfaceConfigurationChildBuilder
-
build
public Configuration build()
Description copied from interface:ConfigurationChildBuilder
Builds a configuration object- Specified by:
build
in interfaceConfigurationChildBuilder
-
-