Parameter Settings

Skip to end of metadata
Go to start of metadata

Setting the Initialization Parameters for a Service or Filter

The init-param element in the Coherence operational configuration deployment descriptor defines initialization parameters for a service or filter. The parameters that appear under init-param will be different, depending on the service or filter you are working with.

The following sections describe the parameters that can be configured for these services and filters:

  • ReplicatedCache Service Parameters
  • DistributedCache Service Parameters
  • InvocationService Parameters
  • ProxyService Parameters
  • Compression Filter Parameters

In the following tables, Parameter Name column refers to the value of the param-name element and Value Description column refers to the possible values for the corresponding param-value element.

For example when you see:

Parameter Name Value Description
local-storage Specifies whether or not this member of the DistributedCache service enables the local storage.

Legal values are true or false.

Default value is true.

Preconfigured override is tangosol.coherence.distributed.localstorage

it means that the init-params element may look as follows

or as follows:

Parameters

Used in: init-param.

The following table describes the specific parameter <param-name> - <param-value> pairs that can be configured for various elements.

ReplicatedCache Service Parameters

Description

ReplicatedCache service elements support the following parameters:

These settings may also be specified as part of the replicated-scheme element in the cache configuration descriptor.

Parameters

Parameter Name Value Description
standard-lease-milliseconds Specifies the duration of the standard lease in milliseconds. Once a lease has aged past this number of milliseconds, the lock will automatically be released. Set this value to zero to specify a lease that never expires. The purpose of this setting is to avoid deadlocks or blocks caused by stuck threads; the value should be set higher than the longest expected lock duration (e.g. higher than a transaction timeout). It's also recommended to set this value higher then packet-delivery/timeout-milliseconds value.

Legal values are from positive long numbers or zero.

Default value is 0.
lease-granularity Specifies the lease ownership granularity. Available since release 2.3.

Legal values are:

  • thread
  • member

A value of thread means that locks are held by a thread that obtained them and can only be released by that thread. A value of member means that locks are held by a cluster node and any thread running on the cluster node that obtained the lock can release it.

Default value is thread.

mobile-issues Specifies whether or not the lease issues should be transfered to the most recent lock holders.

Legal values are true or false.

Default value is false.

DistributedCache Service Parameters

Description

DistributedCache service elements support the following parameters:

These settings may also be specified as part of the distributed-scheme element in the cache configuration descriptor.

Parameters

Parameter Name Value Description
<thread-count> Specifies the number of daemon threads used by the distributed cache service.

If zero, all relevant tasks are performed on the service thread.

Legal values are from positive integers or zero.

Default value is 0.

Preconfigured override is tangosol.coherence.distributed.threads
<lease-granularity> Specifies the lease ownership granularity. Available since release 2.3.

Legal values are:

  • thread
  • member

A value of thread means that locks are held by a thread that obtained them and can only be released by that thread. A value of member means that locks are held by a cluster node and any thread running on the cluster node that obtained the lock can release it.

Default value is thread.

<transfer-threshold> Specifies the threshold for the primary buckets distribution in kilo-bytes. When a new node joins the distributed cache service or when a member of the service leaves, the remaining nodes perform a task of bucket ownership re-destribution. During this process, the existing data gets re-balanced along with the ownership information. This parameter indicates a preferred message size for data transfer communications. Setting this value lower will make the distribution process take longer, but will reduce network bandwidth utilization during this activity.

Legal values are integers greater then zero.

Default value is 512 (0.5MB).

Preconfigured override is tangosol.coherence.distributed.transfer
<partition-count> Specifies the number of partitions that a partitioned (distributed) cache will be "chopped up" into. Each member running the partitioned cache service that has the local-storage option set to true will manage a "fair" (balanced) number of partitions.

The number of partitions should be a prime number and sufficiently large such that a given partition is expected to be no larger than 50MB in size.

Good defaults for example service storage sizes are provided below:
service storage parition-count
100M 257
1G 509
10G 2039
50G 4093
100G 8191

A list of first 1,000 primes can be found at

http://www.utm.edu/research/primes/lists/small/1000.txt



Legal values are positive integers. The default value is 257.

<local-storage> Specifies whether or not this member of the DistributedCache service enables the local storage.
Normally this value should be left unspecified within the configuration file, and instead set on a per-process basis using the tangosol.coherence.distributed.localstorage system property. This allows cache clients and servers to use the same configuration descriptor.

Legal values are true or false.

Default value is true.

Preconfigured override is tangosol.coherence.distributed.localstorage

<backup-count> Specifies the number of members of the DistributedCache service that hold the backup data for each unit of storage in the cache.

Value of 0 means that in the case of abnormal termination, some portion of the data in the cache will be lost. Value of N means that if up to N cluster nodes terminate at once, the cache data will be preserved.

To maintain the distributed cache of size M, the total memory usage in the cluster does not depend on the number of cluster nodes and will be in the order of M*(N+1).

Recommended values are 0, 1 or 2.

Default value is 1.
<backup-storage/type> Specifies the type of the storage used to hold the backup data.

Legal values are:

  • on-heap - The corresponding implementations class is java.util.HashMap.

  • off-heap - The corresponding implementations class is ${xhtml} using ${xhtml}. Only available with JDK 1.4 and later.

  • file-mapped - The corresponding implementations class is ${xhtml} using ${xhtml}. Only available with JDK 1.4 and later.

  • custom - The corresponding implementations class is the class specified by the backup-storage/class element.

  • scheme - The corresponding implementations class is the map returned by the ConfigurableCacheFactory for the scheme referred to by the backup-storage/scheme-name element.

Default value is on-heap.

Preconfigured override is tangosol.coherence.distributed.backup

<backup-storage/initial-size> Only applicable with the off-heap and file-mapped types.

Specifies the initial buffer size in bytes.

The value of this element must be in the following format:

[\d]+[[.][\d]]?[K|k|M|m|G|g]?[B|b]?

where the first non-digit (from left to right) indicates the factor with which the preceding decimal value should be multiplied:

  • K or k (kilo, 210)
  • M or m (mega, 220)
  • G or g (giga, 230)

If the value does not contain a factor, a factor of mega is assumed.

Legal values are positive integers between 1 and Integer.MAX_VALUE - 1023 (that is, 2,147,482,624 bytes).

Default value is 1MB.

<backup-storage/maximum-size> Only applicable with the off-heap and file-mapped types.

Specifies the maximum buffer size in bytes.

The value of this element must be in the following format:

[\d]+[[.][\d]]?[K|k|M|m|G|g]?[B|b]?

where the first non-digit (from left to right) indicates the factor with which the preceding decimal value should be multiplied:

  • K or k (kilo, 210)
  • M or m (mega, 220)
  • G or g (giga, 230)

If the value does not contain a factor, a factor of mega is assumed.

Legal values are positive integers between 1 and Integer.MAX_VALUE - 1023 (that is, 2,147,482,624 bytes).

Default value is 1024MB.

<backup-storage/directory> Only applicable with the file-mapped type.

Specifies the pathname for the directory that the disk persistence manager ( ${xhtml}) will use as "root" to store files in. If not specified or specifies a non-existent directory, a temporary file in the default location is used.

Default value is the default temporary directory designated by the Java runtime.
<backup-storage/class-name> Only applicable with the custom type.

Specifies a class name for the custom storage implementation. If the class implements ${xhtml} interface then upon construction the setConfig method is called passing the entire backup-storage element.
<backup-storage/scheme-name> Only applicable with the scheme type.

Specifies a scheme name for the ConfigurableCacheFactory.
<key-associator/class-name> Specifies the name of a class that implements the ${xhtml} interface. This implementation must have a zero-parameter public constructor.
<key-partitioning/class-name> Specifies the name of a class that implements the ${xhtml} interface. This implementation must have a zero-parameter public constructor.
<partition-listener/class-name> Specifies the name of a class that implements the ${xhtml} interface. This implementation must have a zero-parameter public constructor.
<task-hung-threshold> Specifies the amount of time in milliseconds that a task can execute before it is considered "hung". Note: a posted task that has not yet started is never considered as hung. This attribute is applied only if the Thread pool is used (the "thread-count" value is positive).

Legal values are positive integers or zero (indicating no default timeout).
<task-timeout> Specifies the default timeout value in milliseconds for tasks that can be timed-out (e.g. implement the ${xhtml} interface), but don't explicitly specify the task execution timeout value. The task execution time is measured on the server side and does not include the time spent waiting in a service backlog queue before being started. This attribute is applied only if the thread pool is used (the "thread-count" value is positive).

Legal values are positive integers or zero (indicating no default timeout).
<request-timeout> Specifies the maximum amount of time a client will wait for a response before abandoning the original request. The request time is measured on the client side as the time elapsed from the moment a request is sent for execution to the corresponding server node(s) and includes the following:

(1) the time it takes to deliver the request to an executing node (server);
(2) the interval between the time the task is received and placed into a service queue until the execution starts;
(3) the task execution time;
(4) the time it takes to deliver a result back to the client.

Legal values are positive integers or zero (indicating no default timeout).

InvocationService Parameters

Description

InvocationService service elements support the following parameters:

These settings may also be specified as part of the invocation-scheme element in the cache configuration descriptor.

Parameters

Parameter Name Value Description
<thread-count> Specifies the number of daemon threads to be used by the invocation service.

If zero, all relevant tasks are performed on the service thread.

Legal values are from positive integers or zero.

Preconfigured override is tangosol.coherence.invocation.threads

Default value is 0.
<task-hung-threshold> Specifies the amount of time in milliseconds that a task can execute before it is considered "hung". Note: a posted task that has not yet started is never considered as hung. This attribute is applied only if the Thread pool is used (the "thread-count" value is positive).
<task-timeout> Specifies the default timeout value in milliseconds for tasks that can be timed-out (e.g. implement the ${xhtml} interface), but don't explicitly specify the task execution timeout value. The task execution time is measured on the server side and does not include the time spent waiting in a service backlog queue before being started. This attribute is applied only if the thread pool is used (the "thread-count" value is positive).

Legal values are positive integers or zero (indicating no default timeout).
<request-timeout> Specifies the default timeout value in milliseconds for requests that can time-out (e.g. implement the ${xhtml} interface), but don't explicitly specify the request timeout value. The request time is measured on the client side as the time elapsed from the moment a request is sent for execution to the corresponding server node(s) and includes the following:

(1) the time it takes to deliver the request to an executing node (server);
(2) the interval between the time the task is received and placed into a service queue until the execution starts;
(3) the task execution time;
(4) the time it takes to deliver a result back to the client.

Legal values are positive integers or zero (indicating no default timeout).

ProxyService Parameters

Description

ProxyService service elements support the following parameters:

These settings may also be specified as part of the proxy-scheme element in the cache configuration descriptor.

Parameters

Parameter Name Value Description
thread-count Specifies the number of daemon threads to be used by the proxy service.

If zero, all relevant tasks are performed on the service thread.

Legal values are from positive integers or zero.

Default value is 0.

Preconfigured override is tangosol.coherence.proxy.threads

Compression Filter Parameters

The compression filter ${xhtml}, supports the following parameters (see java.util.zip.Deflater for details):

Parameters

Parameter Name Value Description
buffer-length Spesifies compression buffer length in bytes.

Legal values are from positive integers or zero.

Default value is 0.
strategy Specifies the compressions strategy.

Legal values are:

  • gzip
  • huffman-only
  • filtered
  • default

Default value is gzip.

level Specifies the compression level.

Legal values are:

  • default
  • compression
  • speed
  • none

Default value is default.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.