|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.infinispan.client.hotrod
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Defines all the flags available in the Hot Rod client that can influence the behavior of operations. Available flags:@author Mircea.Markus@jboss.com @since 4.1
- .FORCE_RETURN_VALUE - By default, previously existing values for Map operations are not returned. E.g. RemoteCache.put(Object, Object) does not return the previous value associated with the key. By applying this flag, this default behavior is overridden for the scope of a single invocation, and the previous existing value is returned.
- .DEFAULT_LIFESPAN This flag can either be used as a request flag during a put operation to mean that the default server lifespan should be applied or as a response flag meaning that the return entry has a default lifespan value
- .DEFAULT_MAXIDLE This flag can either be used as a request flag during a put operation to mean that the default server maxIdle should be applied or as a response flag meaning that the return entry has a default maxIdle value
- .SKIP_CACHE_LOAD Skips loading an entry from any configured org.infinispan.persistence.spi.CacheLoaders.
Factory for org.infinispan.client.hotrod.RemoteCaches.Lifecycle:
In order to be able to use an org.infinispan.client.hotrod.RemoteCache, the org.infinispan.client.hotrod.RemoteCacheManager must be started first: beside other things, this instantiates connections to Hot Rod server(s). Starting the org.infinispan.client.hotrod.RemoteCacheManager can be done either at creation by passing start==true to constructor or by using a constructor that does that for you (see C-tor documentation); or after construction by calling .start(). This is an "expensive" object, as it manages a set of persistent TCP connections to the Hot Rod servers. It is recommended to only have one instance of this per JVM, and to cache it between calls to the server (i.e. remoteCache operations). .stop() needs to be called explicitly in order to release all the resources (e.g. threads, TCP connections). Configuration: The cache manager is configured through a Configuration object passed to the constructor (there are also "simplified" constructors that rely on default values). If migrating from a previous version of Infinispan, where Properties were used to configure the RemoteCacheManager, please use the ConfigurationBuilder.withProperties(Properties) method. Below is the list of supported configuration elements:
- infinispan.client.hotrod.request_balancing_strategy, default = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy. For replicated (vs distributed) Hot Rod server clusters, the client balances requests to the servers according to this strategy.
- infinispan.client.hotrod.server_list, default = 127.0.0.1:11222. This is the initial list of Hot Rod servers to connect to, specified in the following format: host1:port1;host2:port2... At least one host:port must be specified.
- infinispan.client.hotrod.force_return_values, default = false. Whether or not to implicitly org.infinispan.client.hotrod.Flag.FORCE_RETURN_VALUE for all calls.
- infinispan.client.hotrod.tcp_no_delay, default = true. Affects TCP NODELAY on the TCP stack.
- infinispan.client.hotrod.tcp_keep_alive, default = false. Affects TCP KEEPALIVE on the TCP stack.
- infinispan.client.hotrod.ping_on_startup, default = true. If true, a ping request is sent to a back end server in order to fetch cluster's topology.
- infinispan.client.hotrod.transport_factory, default = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory - controls which transport to use. Currently only the TcpTransport is supported.
- infinispan.client.hotrod.marshaller, default = org.infinispan.marshall.jboss.GenericJBossMarshaller. Allows you to specify a custom org.infinispan.marshall.Marshaller implementation to serialize and deserialize user objects. For portable serialization payloads, you should configure the marshaller to be org.infinispan.client.hotrod.marshall.ApacheAvroMarshaller
- infinispan.client.hotrod.async_executor_factory, default = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory. Allows you to specify a custom asynchroous executor for async calls.
- infinispan.client.hotrod.default_executor_factory.pool_size, default =
1099. If the default executor is used, this configures the number of threads to initialize the executor with.- infinispan.client.hotrod.default_executor_factory.queue_size, default = 100000. If the default executor is used, this configures the queue size to initialize the executor with.
- infinispan.client.hotrod.hash_function_impl.1, default = It uses the hash function specified by the server in the responses as indicated in org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory. This specifies the version of the hash function and consistent hash algorithm in use, and is closely tied with the HotRod server version used.
- infinispan.client.hotrod.key_size_estimate, default = 64. This hint allows sizing of byte buffers when serializing and deserializing keys, to minimize array resizing.
- infinispan.client.hotrod.value_size_estimate, default = 512. This hint allows sizing of byte buffers when serializing and deserializing values, to minimize array resizing.
- infinispan.client.hotrod.socket_timeout, default = 60000 (60 seconds). This property defines the maximum socket read timeout before giving up waiting for bytes from the server.
- infinispan.client.hotrod.protocol_version, default = 1.1 .This property defines the protocol version that this client should use. Other valid values include 1.0.
- infinispan.client.hotrod.connect_timeout, default = 60000 (60 seconds). This property defines the maximum socket connect timeout before giving up connecting to the server.
- infinispan.client.hotrod.max_retries, default = 10. This property defines the maximum number of retries in case of a recoverable error. A valid value should be greater or equals to 0 (zero). Zero mean no retry.
The following properties are related to connection pooling:@author Mircea.Markus@jboss.com @since 4.1
- maxActive - controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. The default setting for this parameter is -1, i.e. there is no limit.
- maxTotal - sets a global limit on the number persistent connections that can be in circulation within the combined set of servers. When non-positive, there is no limit to the total number of persistent connections in circulation. When maxTotal is exceeded, all connections pools are exhausted. The default setting for this parameter is -1 (no limit).
- maxIdle - controls the maximum number of idle persistent connections, per server, at any time. When negative, there is no limit to the number of connections that may be idle per server. The default setting for this parameter is -1.
- whenExhaustedAction - specifies what happens when asking for a connection from a server's pool, and that pool is exhausted. Possible values:
The default whenExhaustedAction setting is 1.
- 0 - an exception will be thrown to the calling user
- 1 - the caller will block (invoke waits until a new or idle connections is available.
- 2 - a new persistent connection will be created and returned (essentially making maxActive meaningless.)
- Optionally, one may configure the pool to examine and possibly evict connections as they sit idle in the pool and to ensure that a minimum number of idle connections is maintained for each server. This is performed by an "idle connection eviction" thread, which runs asynchronously. The idle object evictor does not lock the pool throughout its execution. The idle connection eviction thread may be configured using the following attributes:
- timeBetweenEvictionRunsMillis - indicates how long the eviction thread should sleep before "runs" of examining idle connections. When non-positive, no eviction thread will be launched. The default setting for this parameter is 2 minutes
- minEvictableIdleTimeMillis - specifies the minimum amount of time that an connection may sit idle in the pool before it is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this parameter is 1800000(30 minutes).
- testWhileIdle - indicates whether or not idle connections should be validated by sending an TCP packet to the server, during idle connection eviction runs. Connections that fail to validate will be dropped from the pool. This setting has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this parameter is true.
- minIdle - sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server. The default setting for this parameter is 1.