Package org.infinispan.client.hotrod.configuration

Hot Rod client configuration API.

It is possible to configure the RemoteCacheManager either programmatically, using a URI or by constructing a Configuration using a ConfigurationBuilder or declaratively, by placing a properties file named 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 TCP_NO_DELAY flag
infinispan.client.hotrod.tcp_keep_alive Boolean false Enables/disables the TCP_KEEPALIVE flag
infinispan.client.hotrod.client_intelligence String HASH_DISTRIBUTION_AWARE The ClientIntelligence
infinispan.client.hotrod.request_balancing_strategy String (class name) RoundRobinBalancingStrategy The FailoverRequestBalancingStrategy
infinispan.client.hotrod.socket_timeout Integer 60000 The timeout for socket read/writes
infinispan.client.hotrod.connect_timeout Integer 60000 The timeout for connections
infinispan.client.hotrod.max_retries Integer 10 The maximum number of operation retries
infinispan.client.hotrod.batch_size Integer 10000 The size of a batches when iterating
infinispan.client.hotrod.protocol_version String The highest version supported by the client in use The Hot Rod version.
Connection pool properties
infinispan.client.hotrod.connection_pool.max_active Integer -1 (no limit) Maximum number of connections per server
infinispan.client.hotrod.connection_pool.exhausted_action Integer WAIT Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.
infinispan.client.hotrod.connection_pool.max_wait Long -1 (no limit) 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 (no limit) Minimum number of idle connections (per server) that should always be available
infinispan.client.hotrod.connection_pool.min_evictable_idle_time Integer -1 (no limit) Minimum amount of time that an connection may sit idle in the pool
infinispan.client.hotrod.connection_pool.max_pending_requests Integer -1 (no limit) Specifies maximum number of requests sent over single connection at one instant.
Thread pool properties
infinispan.client.hotrod.async_executor_factory String (class name) DefaultAsyncExecutorFactory The 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) Suffix for the default executor thread names
Marshalling properties
infinispan.client.hotrod.marshaller String (class name) GenericJBossMarshaller if the infinispan-jboss-marshalling module is present on the classpath, otherwise ProtoStreamMarshaller is used The marshaller that serializes keys and values
infinispan.client.hotrod.key_size_estimate Integer 64 The estimated size of keys in bytes when marshalled.
infinispan.client.hotrod.value_size_estimate Integer 512 The estimated size of values in bytes when marshalled.
infinispan.client.hotrod.force_return_values Boolean false Whether to return values for puts/removes
infinispan.client.hotrod.java_serial_whitelist String N/A A class whitelist which are trusted for unmarshalling.
infinispan.client.hotrod.hash_function_impl.2 String ConsistentHashV2 The hash function to use.
infinispan.client.hotrod.context-initializers String (class names) (empty) A list of SerializationContextInitializer implementation
Encryption (TLS/SSL) properties
infinispan.client.hotrod.use_ssl Boolean false Enable TLS (implicitly enabled if a trust store is set)
infinispan.client.hotrod.key_store_file_name String N/A The filename of a keystore to use when using client certificate authentication.
infinispan.client.hotrod.key_store_type String JKS The keystore type
infinispan.client.hotrod.key_store_password String N/A The keystore password
infinispan.client.hotrod.key_alias String N/A The alias of the
infinispan.client.hotrod.key_store_certificate_password String N/A The certificate password in the keystore.
infinispan.client.hotrod.trust_store_file_name String N/A The path of the trust store.
infinispan.client.hotrod.trust_store_path String N/A The path of the trust store in PEM format.
infinispan.client.hotrod.trust_store_type String JKS The type of the trust store.
infinispan.client.hotrod.trust_store_password String N/A The password of the trust store.
infinispan.client.hotrod.sni_host_name String N/A The SNI hostname to connect to.
infinispan.client.hotrod.ssl_protocol String N/A The SSL protocol to use (e.g. TLSv1.2)
Authentication properties
infinispan.client.hotrod.use_auth Boolean Implicitly enabled by other authentication properties Enable authentication.
infinispan.client.hotrod.sasl_mechanism String
if username and password are set
EXTERNAL if a trust store is set
The SASL mechanism to use for authentication.
infinispan.client.hotrod.auth_callback_handler String Chosen automatically based on selected SASL mech The CallbackHandler to use for providing credentials for authentication.
infinispan.client.hotrod.auth_server_name String N/A The server name to use (for Kerberos).
infinispan.client.hotrod.auth_username String N/A The username
infinispan.client.hotrod.auth_password String N/A The password
infinispan.client.hotrod.auth_tokenStringN/AThe OAuth token
infinispan.client.hotrod.auth_realm String ApplicationRealm The realm (for DIGEST-MD5 authentication).
infinispan.client.hotrod.sasl_properties.* String N/A A SASL property (mech-specific)
Transaction properties
infinispan.client.hotrod.transaction.transaction_manager_lookup String (class name) GenericTransactionManagerLookup A class to lookup available transaction managers.
infinispan.client.hotrod.transaction.transaction_mode String (TransactionMode enum name) NONE The default transaction mode
infinispan.client.hotrod.transaction.timeout long 60000L The TransactionConfigurationBuilder.timeout(long, java.util.concurrent.TimeUnit) timeout.
Near cache properties
infinispan.client.hotrod.near_cache.mode String (NearCacheMode enum name) DISABLED The default near-cache mode. It is preferable to use the per-cache configuration.
infinispan.client.hotrod.near_cache.max_entries Integer -1 (no limit) The 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 Pattern) null (matches all cache names) A 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.
XSite 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 AbstractConfigurationChildBuilder.addCluster(java.lang.String) and ClusterConfigurationBuilder.addClusterNode(java.lang.String, int)
Statistics properties
infinispan.client.hotrod.statistics Boolean Default value StatisticsConfiguration.ENABLED Relates to StatisticsConfigurationBuilder.enabled(boolean)
infinispan.client.hotrod.jmx Boolean Default value StatisticsConfiguration.JMX_ENABLED Relates to StatisticsConfigurationBuilder.jmxEnabled(boolean)
infinispan.client.hotrod.jmx_name String Default value StatisticsConfiguration.JMX_NAME Relates to StatisticsConfigurationBuilder.jmxName(java.lang.String)
infinispan.client.hotrod.jmx_domain String Default value StatisticsConfiguration.JMX_DOMAIN Relates to StatisticsConfigurationBuilder.jmxDomain(java.lang.String)
Per-cache properties
In the following properties, cachename may use wildcard globbing (e.g. cache-*) and may be enclosed in square brackets if the name includes the '.' character (e.g. [example.MyConfig])
infinispan.client.hotrod.cache.cachename.configuration XML N/A Provides a cache definition, 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 pointing to a cache definition, 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 configuration 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 (NearCacheMode enum name) DISABLED The near-cache 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 maximum number of entries to keep locally for the specified cache.
infinispan.client.hotrod.cache.cachename.force_return_values Boolean false Whether to return values for puts/removes for the specified cache.
infinispan.client.hotrod.cache.cachename.transaction.transaction_mode String (TransactionMode enum name) NONE The default transaction mode for the specified cache.
Public API