org.infinispan.client.hotrod.configuration.package-info Maven / Gradle / Ivy
The newest version!
/**
* Hot Rod client configuration API.
*
* It is possible to configure the {@link org.infinispan.client.hotrod.RemoteCacheManager} either programmatically,
* using a URI or by constructing a {@link org.infinispan.client.hotrod.configuration.Configuration} using a {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder}
* or declaratively, by placing a properties file named hotrod-client.properties in the classpath.
*
* A Hot Rod URI follows the following format:
* hotrod[s]://[user[:password]@]host[:port][,host2[:port]][?property=value[&property2=value2]]
*
*
* - hotrod or hotrods specifies whether to use a plain connection or TLS/SSL encryption.
* - user and password optionally specify authentication credentials.
* - host and port comma-separated list of one or more servers.
* - property and value one or more ampersand-separated (&) property name/value pairs. The property name must omit the infinispan.client.hotrod prefix.
*
*
* The following table describes the individual properties
* and the related programmatic configuration API.
*
*
*
*
* Name
* Type
* Default
* Description
*
*
*
*
* Connection properties
*
*
* infinispan.client.hotrod.uri
* String
* N/A
* Configures the client via a URI
*
*
* infinispan.client.hotrod.server_list
* String
* N/A
* Adds a list of remote servers in the form: host1[:port][;host2[:port]]...
*
*
* infinispan.client.hotrod.tcp_no_delay
* Boolean
* true
* Enables/disables the {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#tcpNoDelay(boolean) TCP_NO_DELAY} flag
*
*
* infinispan.client.hotrod.tcp_keep_alive
* Boolean
* false
* Enables/disables the {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#tcpKeepAlive(boolean) TCP_KEEPALIVE} flag
*
*
* infinispan.client.hotrod.client_intelligence
* String
* {@link org.infinispan.client.hotrod.configuration.ClientIntelligence#HASH_DISTRIBUTION_AWARE HASH_DISTRIBUTION_AWARE}
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#clientIntelligence(ClientIntelligence) ClientIntelligence}
*
*
* infinispan.client.hotrod.request_balancing_strategy
* String (class name)
* {@link org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy RoundRobinBalancingStrategy}
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#balancingStrategy(String) FailoverRequestBalancingStrategy}
*
*
* infinispan.client.hotrod.socket_timeout
* Integer
* 2000
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#socketTimeout(int) timeout} for socket read/writes
*
*
* infinispan.client.hotrod.connect_timeout
* Integer
* 2000
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#connectionTimeout(int) timeout} for connections
*
*
* infinispan.client.hotrod.max_retries
* Integer
* 2
* The maximum number of operation {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#maxRetries(int) retries}
*
*
* infinispan.client.hotrod.batch_size
* Integer
* 10000
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#batchSize(int) size} of a batches when iterating
*
*
* infinispan.client.hotrod.protocol_version
* String
* Latest version supported by the client in use
* The Hot Rod {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#version(org.infinispan.client.hotrod.ProtocolVersion) version}.
*
*
* infinispan.client.hotrod.dns_resolver_min_ttl
* Integer
* 0
* The minimum TTL of the cached DNS resource records in seconds. If the TTL of the DNS resource record returned by the DNS server is shorter than the minimum TTL, the resolver ignores the TTL provided by the DNS server and uses the minimum TTL instead. The defaults respect the DNS server TTL.
*
*
* infinispan.client.hotrod.dns_resolver_max_ttl
* Integer
* Integer.MAX_VALUE
* The maximum TTL of the cached DNS resource records in seconds. If the TTL of the DNS resource record returned by the DNS server is longer than the maximum TTL, the resolver ignores the TTL provided by the DNS server and uses the maximum TTL instead. The defaults respect the DNS server TTL.
*
*
* infinispan.client.hotrod.dns_resolver_negative_ttl
* Integer
* 0
* Sets the TTL of the cache for the failed DNS queries in seconds.
*
*
* infinispan.client.hotrod.transport_factory
* String
* {@link org.infinispan.client.hotrod.impl.transport.netty.DefaultTransportFactory}
* Specifies the transport factory to use.
*
*
* Connection pool properties
*
*
* infinispan.client.hotrod.connection_pool.max_active
* Integer
* -1 (no limit)
* Maximum number of {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#maxActive(int) connections} per server
*
*
* infinispan.client.hotrod.connection_pool.exhausted_action
* String
* {@link org.infinispan.client.hotrod.configuration.ExhaustedAction#WAIT WAIT}
* Specifies what happens when asking for a connection from a server's pool, and that pool is {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#exhaustedAction(org.infinispan.client.hotrod.configuration.ExhaustedAction) exhausted}.
*
*
* infinispan.client.hotrod.connection_pool.max_wait
* Long
* -1 (no limit)
* {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#maxWait(long) Time} to wait in milliseconds for a connection to become available when exhausted_action is WAIT
*
*
* infinispan.client.hotrod.connection_pool.min_idle
* Integer
* 1
* Minimum number of idle {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#minIdle(int) connections} that each server should have available.
*
*
* infinispan.client.hotrod.connection_pool.min_evictable_idle_time
* Integer
* 180000
* Minimum amount of {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#minEvictableIdleTime(long) time} in milliseconds that an connection may sit idle in the pool
*
*
* infinispan.client.hotrod.connection_pool.max_pending_requests
* Integer
* 5
* Specifies maximum number of {@link org.infinispan.client.hotrod.configuration.ConnectionPoolConfigurationBuilder#maxPendingRequests(int) requests} sent over single connection at one instant.
*
*
* Thread pool properties
*
*
* infinispan.client.hotrod.async_executor_factory
* String (class name)
* {@link org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory DefaultAsyncExecutorFactory}
* The {@link org.infinispan.client.hotrod.configuration.ExecutorFactoryConfigurationBuilder#factoryClass(String) factory} for creating threads
*
*
* infinispan.client.hotrod.default_executor_factory.pool_size
* Integer
* 99
* Size of the thread pool
*
*
* infinispan.client.hotrod.default_executor_factory.threadname_prefix
* String
* HotRod-client-async-pool
* Prefix for the default executor thread names
*
*
* infinispan.client.hotrod.default_executor_factory.threadname_suffix
* String
* "" (empty value)
* Suffix for the default executor thread names
*
*
* Marshalling properties
*
*
* infinispan.client.hotrod.marshaller
* String (class name)
* {@link org.infinispan.jboss.marshalling.commons.GenericJBossMarshaller} if the infinispan-jboss-marshalling module is present on the classpath, otherwise {@link org.infinispan.commons.marshall.ProtoStreamMarshaller} is used
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#marshaller(String) marshaller} that serializes keys and values
*
*
* infinispan.client.hotrod.key_size_estimate
* Integer
* N/A
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#keySizeEstimate(int) estimated size} of keys in bytes when marshalled. This configuration property is deprecated and does not take effect.
*
*
* infinispan.client.hotrod.value_size_estimate
* Integer
* N/A
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#valueSizeEstimate(int) estimated size} of values in bytes when marshalled. This configuration property is deprecated and does not take effect.
*
*
* infinispan.client.hotrod.force_return_values
* Boolean
* false
* Whether to {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#forceReturnValues(boolean) return values} for puts/removes
*
*
* infinispan.client.hotrod.java_serial_allowlist
* String
* N/A
* A {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#addJavaSerialAllowList(String...) class allowList} which are trusted for unmarshalling.
*
*
* infinispan.client.hotrod.hash_function_impl.2
* String
* {@link org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV2 ConsistentHashV2}
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#consistentHashImpl(int, String) hash function} to use.
*
*
* infinispan.client.hotrod.context-initializers
* String (class names)
* "" (empty value)
* A list of {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... contextInitializers) SerializationContextInitializer implementation}
*
*
* Encryption (TLS/SSL) properties
*
*
* infinispan.client.hotrod.use_ssl
* Boolean
* false
* {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#enable() Enable TLS} (implicitly enabled if a trust store is set)
*
*
* infinispan.client.hotrod.key_store_file_name
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#keyStoreFileName(String) filename} of a keystore to use when using client certificate authentication.
*
*
* infinispan.client.hotrod.key_store_type
* String
* JKS
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#keyStoreType(String) keystore type}
*
*
* infinispan.client.hotrod.key_store_password
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#keyStorePassword(char[]) keystore password}
*
*
* infinispan.client.hotrod.key_alias
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#keyAlias(String) alias} of the
*
*
* infinispan.client.hotrod.trust_store_file_name
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#trustStoreFileName(String) path} of the trust store.
*
*
* infinispan.client.hotrod.trust_store_type
* String
* JKS
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#trustStoreType(String) type} of the trust store. Valid values are JKS, JCEKS, PCKS12 and PEM
*
*
* infinispan.client.hotrod.trust_store_password
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#trustStorePassword(char[]) password} of the trust store.
*
*
* infinispan.client.hotrod.sni_host_name
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#sniHostName(String) SNI hostname} to connect to.
*
*
* infinispan.client.hotrod.ssl_ciphers
* String
* N/A
* A list of ciphers, separated with spaces and in order of preference, that are used during the SSL handshake to negotiate
* a cryptographic algorithm for key encrytion. By default, the SSL protocol (e.g. TLSv1.2) determines which ciphers to use.
* You should customize the cipher list with caution to avoid vulnerabilities from weak algorithms.
* For details about cipher lists and possible values, refer to OpenSSL documentation at https://www.openssl.org/docs/man1.1.1/man1/ciphers
*
*
* infinispan.client.hotrod.ssl_hostname_validation
* boolean
* true
* Whether to enable TLS hostname validation using the rules defined in RFC 2818.
*
*
* infinispan.client.hotrod.ssl_protocol
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.SslConfigurationBuilder#protocol(String) SSL protocol} to use (e.g. TLSv1.2).
*
*
* infinispan.client.hotrod.ssl_provider
* String
* N/A
* The security provider to use when creating the SSL engine. If left unspecified, it will use the default JDK provider.
*
*
* Authentication properties
*
*
* infinispan.client.hotrod.use_auth
* Boolean
* Enabled implicitly with other authentication properties.
* {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#enabled(boolean) Enable} authentication.
*
*
* infinispan.client.hotrod.sasl_mechanism
* String
* SCRAM-SHA-256
if username and password are set
EXTERNAL if a trust store is set.
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#saslMechanism(String) SASL mechanism} to use for authentication.
*
*
* infinispan.client.hotrod.auth_callback_handler
* String
* Automatically selected based on the configured SASL mechanism.
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#callbackHandler(javax.security.auth.callback.CallbackHandler) CallbackHandler} to use for providing credentials for authentication.
*
*
* infinispan.client.hotrod.auth_server_name
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#serverName(String) server name} to use (for Kerberos).
*
*
* infinispan.client.hotrod.auth_username
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#username(String) username}
*
*
* infinispan.client.hotrod.auth_password
* String
* N/A
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#password(char[]) password}
*
*
* * infinispan.client.hotrod.auth_token
* * String
* * N/A
* * The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#token(String) OAuth token}
* *
*
* infinispan.client.hotrod.auth_realm
* String
* default
* The {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#realm(String) realm} (for DIGEST-MD5 authentication).
*
*
* infinispan.client.hotrod.sasl_properties.*
* String
* N/A
* A {@link org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder#saslProperties(java.util.Map) SASL property} (mech-specific)
*
*
* Transaction properties
*
*
* infinispan.client.hotrod.transaction.transaction_manager_lookup
* String (class name)
* {@link org.infinispan.client.hotrod.configuration.TransactionConfigurationBuilder#defaultTransactionManagerLookup() GenericTransactionManagerLookup}
* [Deprecated] A class to {@link org.infinispan.client.hotrod.configuration.TransactionConfigurationBuilder#transactionManagerLookup(org.infinispan.commons.tx.lookup.TransactionManagerLookup) lookup} available transaction managers.
*
*
* infinispan.client.hotrod.transaction.transaction_mode
* String ({@link org.infinispan.client.hotrod.configuration.TransactionMode} enum name)
* {@link org.infinispan.client.hotrod.configuration.TransactionMode#NONE NONE}
* [Deprecated] The default {@link org.infinispan.client.hotrod.configuration.TransactionConfigurationBuilder#transactionMode(TransactionMode) transaction mode}
*
*
* infinispan.client.hotrod.transaction.timeout
* long
* 60000L
* The {@link org.infinispan.client.hotrod.configuration.TransactionConfigurationBuilder#timeout(long, java.util.concurrent.TimeUnit)} timeout.
*
*
* Near cache properties
*
*
* infinispan.client.hotrod.near_cache.mode
* String ({@link org.infinispan.client.hotrod.configuration.NearCacheMode} enum name)
* {@link org.infinispan.client.hotrod.configuration.NearCacheMode#DISABLED DISABLED}
* The default near-cache {@link org.infinispan.client.hotrod.configuration.NearCacheConfigurationBuilder#mode(NearCacheMode) mode}. It is preferable to use the per-cache configuration.
*
*
* infinispan.client.hotrod.near_cache.max_entries
* Integer
* -1 (no limit)
* The {@link org.infinispan.client.hotrod.configuration.NearCacheConfigurationBuilder#maxEntries(int) maximum} number of entries to keep in the local cache. It is preferable to use the per-cache configuration.
*
*
* infinispan.client.hotrod.near_cache.name_pattern
* String (regex pattern, see {@link java.util.regex.Pattern})
* null (matches all cache names)
* A {@link org.infinispan.client.hotrod.configuration.NearCacheConfigurationBuilder#cacheNamePattern(String) regex} which matches caches for which near-caching should be enabled. This property is deprecated and it is preferable to use the per-cache configuration.
*
*
* Cross-site replication properties
*
*
* infinispan.client.hotrod.cluster.SITE
* String HOST and int PORT configuration
* Example for siteA and siteB:
* infinispan.client.hotrod.cluster.siteA=hostA1:11222; hostA2:11223`
* infinispan.client.hotrod.cluster.siteB=hostB1:11222; hostB2:11223`
*
* Relates to {@link org.infinispan.client.hotrod.configuration.ClusterConfigurationBuilder#addCluster(java.lang.String)} and
* {@link org.infinispan.client.hotrod.configuration.ClusterConfigurationBuilder#addClusterNode(java.lang.String, int)}
*
*
* Statistics properties
*
*
* infinispan.client.hotrod.statistics
* Boolean
* Default value {@link org.infinispan.client.hotrod.configuration.StatisticsConfiguration#ENABLED}
* Relates to {@link org.infinispan.client.hotrod.configuration.StatisticsConfigurationBuilder#enabled(boolean)}
*
*
* infinispan.client.hotrod.jmx
* Boolean
* Default value {@link org.infinispan.client.hotrod.configuration.StatisticsConfiguration#JMX_ENABLED}
* Relates to {@link org.infinispan.client.hotrod.configuration.StatisticsConfigurationBuilder#jmxEnabled(boolean)}
*
*
* infinispan.client.hotrod.jmx_name
* String
* Default value {@link org.infinispan.client.hotrod.configuration.StatisticsConfiguration#JMX_NAME}
* Relates to {@link org.infinispan.client.hotrod.configuration.StatisticsConfigurationBuilder#jmxName(java.lang.String)}
*
*
* infinispan.client.hotrod.jmx_domain
* String
* Default value {@link org.infinispan.client.hotrod.configuration.StatisticsConfiguration#JMX_DOMAIN}
* Relates to {@link org.infinispan.client.hotrod.configuration.StatisticsConfigurationBuilder#jmxDomain(java.lang.String)}
*
*
* infinispan.client.hotrod.tracing.propagation_enabled
* Boolean
* Enabled implicitly by the presence of the OpenTelemetry API cn the client classpath.
* Relates to {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#disableTracingPropagation()}} ()}
*
*
* Per-cache properties
*
*
* In per-cache configuration properties, you can use wildcards with cachename, for example: cache-*
.
*
*
* If cache names include the '.'
character you must enclose the cache name in square brackets, for example: [example.MyConfig]
.
*
*
* infinispan.client.hotrod.cache.cachename.configuration
* XML
* N/A
* Provides a cache configuration, in XML format, to use when clients request caches that do not exist.
*
*
* infinispan.client.hotrod.cache.cachename.configuration_uri
* XML
* N/A
* Provides a URI to a cache configuration, in XML format, to use when clients request caches that do not exist.
*
*
* infinispan.client.hotrod.cache.cachename.template_name
* String
* N/A
* Names a cache template to use when clients request caches that do not exist. The cache template must be available on the server.
*
*
* infinispan.client.hotrod.cache.cachename.near_cache.mode
* String ({@link org.infinispan.client.hotrod.configuration.NearCacheMode} enum name)
* {@link org.infinispan.client.hotrod.configuration.NearCacheMode#DISABLED DISABLED}
* The near-cache {@link org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder#nearCacheMode(org.infinispan.client.hotrod.configuration.NearCacheMode)} (NearCacheMode) mode} for this cache
*
*
* infinispan.client.hotrod.cache.cachename.near_cache.max_entries
* Integer
* -1 (no limit)
* The {@link org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder#nearCacheMaxEntries(int) maximum} number of entries to keep locally for the specified cache.
*
*
* infinispan.client.hotrod.cache.cachename.force_return_values
* Boolean
* false
* Whether to {@link org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder#forceReturnValues(boolean) return values} for puts/removes for the specified cache.
*
*
* infinispan.client.hotrod.cache.cachename.transaction.transaction_mode
* String ({@link org.infinispan.client.hotrod.configuration.TransactionMode} enum name)
* {@link org.infinispan.client.hotrod.configuration.TransactionMode#NONE NONE}
* The default {@link org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder#transactionMode(TransactionMode) transaction mode} for the specified cache.
*
*
* infinispan.client.hotrod.cache.cachename.transaction.transaction_manager_lookup
* String (class name)
* {@link org.infinispan.client.hotrod.transaction.lookup.GenericTransactionManagerLookup GenericTransactionManagerLookup}
* The {@link org.infinispan.commons.tx.lookup.TransactionManagerLookup} for the specified cache.
*
*
* infinispan.client.hotrod.cache.cachename.marshaller
* String (class name)
* {@link org.infinispan.commons.marshall.ProtoStreamMarshaller} unless another marshaller is used.
* The {@link org.infinispan.client.hotrod.configuration.ConfigurationBuilder#marshaller(String) marshaller} that serializes keys and values for the specified cache.
*
*
*
*
* @api.public
*/
package org.infinispan.client.hotrod.configuration;