C Topic Configuration Element Reference

The topic configuration element reference includes all non-terminal topic configuration elements.Each section includes instructions on how to use the element and also includes descriptions for all valid subelements.

page-size

Description

The page-size element specifies the target page size. The default value is 1MB.

paged-topic-scheme

Used in: caching-schemes

Description

The paged-topic-scheme defines topics where the storage for values and metadata is partitioned across cluster nodes.

Elements

Table C-1 describes the subelements of the paged-topic-scheme element.

Table C-1 paged-topic-scheme Subelements

Element Required/Optional Description

<scheme-name>

Optional

Specifies the scheme's name. The name must be unique within a configuration file.

<scheme-ref>

Optional

Specifies the name of another scheme to inherit from. See Using Scheme Inheritance

<scope-name>

Optional

Specifies the scope name for this configuration. The scope name is added (as a prefix) to all services generated by a cache factory. The name is used to isolate services when using multiple cache factories; thus, avoiding unintended joining of services with similar names from different configurations.

<service-name>

Optional

Specifies a name for the distributed cache service instance that manages the topic that is created from this scheme. The distributed cache service definition is defined within the <services> element in the tangosol-coherence.xml file. See DistributedCache Service Parameters . Different distributed schemes can use different partitioned cache service instances to maintain separate topics. The slash (/) and colon (:) are reserved characters and cannot be used in service names.

<service-priority>

Optional

Specifies the priority for the service thread. Legal values are from 1 to 10 where 10 is the highest priority. The default value is the service-priority value specified in the tangosol-coherence.xml descriptor. See the service-priority parameter in DistributedCache Service Parameters.

<event-dispatcher-priority>

Optional

Specifies the priority for the event dispatcher thread for each service. Legal values are from 1 to 10 where 10 is the highest priority. The default value is the event-dispatcher-priority value specified in the tangosol-coherence.xml descriptor. See the event-dispatcher-priority parameter in DistributedCache Service Parameters.

<serializer>

Optional

Specifies either: the class configuration information for a com.tangosol.io.Serializer implementation used to serialize and deserialize user types, or it references a serializer class configuration that is defined in the operational configuration file. See serializer

<reliable-transport>

Optional

Specifies the transport protocol used by this service for reliable point-to-point communication. Specifying a value results in the use of a service-specific transport instance rather then the shared transport instance that is defined by the <unicast-listener> element. A service-specific transport instance can result in higher performance but at the cost of increased resource consumption and should be used sparingly for select, high priority services. In general, a shared transport instance uses less resource consumption than service-specific transport instances. Valid values are:
  • datagram – UDP .

  • tmb (default) – TCP/IP message bus protocol.

  • tmbs – TCP/IP message bus protocol with SSL support. TMBS requires the use of an SSL socket provider. See socket-provider.

  • sdmb – Socket Direct Protocol (SDP) message bus.

  • sdmbs – SDP message bus with SSL support. SDMBS requires the use of an SSL socket provider. See socket-provider.

The default value is the <reliable-transport> value specified in the tangosol-coherence.xml descriptor. See the reliable-transport parameter in DistributedCache Service Parameters.

<compressor>

Optional

Specifies whether or not backup updates should be compressed in delta form or sent whole. A delta update represents the parts of a backup entry that must be changed in order to synchronize it with the primary version of the entry. Deltas are created and applied using a compressor. The default value is the compressor value specified in the tangosol-coherence.xml descriptor. See the compressor parameter in DistributedCache Service Parameters. Valid values are:
  • none – Disables delta backup; no compressor is used. The whole backup binary entry is replaced when the primary entry changes.

  • standard – Automatically selects a delta compressor based on the serializer being used by the partitioned service.

  • <instance> The configuration for a class that implements the com.tangosol.io.DeltaCompressor interface.

<thread-count-max>

Optional

Specifies the maximum number of daemon threads. Usage of daemon threads varies for different service types. If zero or negative, the service does not use daemon threads and all relevant tasks are performed on the service thread. Furthermore, if negative, tasks are performed on the caller's thread where possible. Valid values are integers greater or equal to the value of the thread-count-minelement. The default value is the thread-count-max value specified in the tangosol-coherence.xml descriptor. See the thread-count-max parameter in DistributedCache Service Parameters.

<thread-count-min>

Optional

Specifies the minimum number of daemon threads. Usage of daemon threads varies for different service types. If zero or negative, the service does not use daemon threads and all relevant tasks are performed on the service thread. Furthermore, if negative, tasks are performed on the caller's thread where possible. Valid values are integers less than or equal to the value of the thread-count-max element. The default value is the thread-count-min value specified in the tangosol-coherence.xml descriptor. See the thread-count-max parameter in DistributedCache Service Parameters

<worker-priority>

Optional

Specifies the priority for the worker threads. Legal values are from 1 to 10 where 10 is the highest priority. The default value is the worker-priority value specified in the tangosol-coherence.xml descriptor. See the worker-priority parameter in DistributedCache Service Parameters.

<local-storage>

Optional

Specifies whether a cluster node contributes storage to the cluster, that is, maintain partitions. When disabled the node is considered a cache client. Legal values are true or false. The default value is the local-storage value specified in the tangosol-coherence.xml descriptor. See the local-storage parameter in DistributedCache Service Parameters.

<partition-count>

Optional

Specifies the number of distributed cache partitions. Each storage-enabled cluster member that is running the distributed cache service manages a balanced number of partitions.

Valid values are positive integers between 1 and 32767 and should be a prime number. A list of primes can be found at http://primes.utm.edu/lists/ . The default value is the value specified in the tangosol-coherence.xml descriptor. See the partition-count parameter in DistributedCache Service Parameters.

<transfer-threshold>

Optional

Specifies the threshold for the primary buckets distribution in kilobytes. When a new node joins the partitioned cache service or when a member of the service leaves, the remaining nodes perform a task of bucket ownership re-distribution. 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 makes the distribution process take longer, but reduces network bandwidth utilization during this activity. Legal values are integers greater then zero. The default value is the transfer-threshold value specified in the tangosol-coherence.xml descriptor. See the transfer-threshold parameter in DistributedCache Service Parameters.

<backup-count>

Optional

Specifies the number of members of the paged topic service that hold the backup data for each unit of storage in the topic. A value of 0 means that for abnormal termination, some portion of the data in the topic is lost. The default value is the backup-count value specified in the tangosol-coherence.xmldescriptor. See DistributedCache Service Parameters

<partition-assignment-strategy>

Optional

Specifies the strategy that is used by a partitioned service to manage partition distribution. The default value is the partition-assignment-strategy value specified in the tangosol-coherence.xml descriptor. See the partition-assignment-strategy parameter in DistributedCache Service Parameters
  • simple – The simple assignment strategy attempts to balance partition distribution while ensuring machine-safety

  • mirror:<service-name> – The mirror assignment strategy attempts to co-locate the service's partitions with the partitions of the specified service. This strategy is used to increase the likelihood that key-associated, cross-service cache access remains local to a member.

  • custom – a class that implements the com.tangosol.net.partition.PartitionAssignmentStrategy interface. Enter a custom strategy using the <instance> element.

<guardian-timeout>

Optional

Specifies the guardian timeout value to use for guarding the service and any dependent threads. If the element is not specified for a given service, the default guardian timeout (as specified by the <timeout-milliseconds> operational configuration element) is used. See <service-guardian.

The value of this element must be in the following format:
(\d)+((.)(\d)+)?[MS|ms|S|s|M|m|H|h|D|d]?

<service-failure-policy>

Optional

Specifies the action to take when an abnormally behaving service thread cannot be terminated gracefully by the service guardian.

Legal values are:
  • exit-cluster (default) – attempts to recover threads that appear to be unresponsive. If the attempt fails, an attempt is made to stop the associated service. If the associated service cannot be stopped, this policy causes the local node to stop the cluster services.

  • exit-process – attempts to recover threads that appear to be unresponsive. If the attempt fails, an attempt is made to stop the associated service. If the associated service cannot be stopped, this policy causes the local node to exit gracefully, halting the process only when the duration of the coherence.shutdown.timeout system property exceeds.

  • logging – causes any detected problems to be logged, but no corrective action to be taken.

  • a custom class – an <instance> subelement is used to provide the class configuration information for a
    com.tangosol.net.ServiceFailurePolicy
    implementation.

<member-listener>

Optional

Specifies the configuration information for a class that implements the com.tangosol.net.MemberListener interface. The implementation must have a public default constructor. See instance.

The MemberListener implementation receives cache service lifecycle events. The element is used as an alternative to programmatically adding a MapListener on a service.

<storage>

Optional

This enum type specifies the storage scheme used to hold topic values and metadata.

Valid values are on-heap, flashjournal or ramjournal. Default value is on-heap.

<transient>

Optional

Specifies whether or not the topic values and metadata should be persisted using a persistence environment. Valid values are true or false. If set to false, a persistence environment is used to persist the contents of the topic values and metadata. If set to true, the topics values and metadata is assumed to be transient and its contents will not be recoverable upon cluster restart. The default value is false.

<persistence>

Optional

Specifies the persistence-related configuration for a partitioned cache service. If this element exists and no persistence.environment value is specified, the default is default-on-demand persistence.

<storage-authorizer>

Optional

Specifies a reference to a storage access authorizer that is defined in an operational configuration file. The storage access authorizer is used by a partitioned cache to authorize access to the underlying cache data. If configured, all read and write access to the data in the topic storage will be validated and/or audited by the configured authorizer.

The following example references a storage access authorizer definition with the id attribute auditing.
<storage-authorizer>auditing</storage-authorizer>

See storage-authorizer.

<partitioned-quorum-policy>

Optional

Specifies quorum policy settings for the partitioned cache service.

<autostart>

Optional

The autostart element is intended to be used by cache servers (that is, com.tangosol.net.DefaultCacheServer). It specifies whether the cache services associated with this cache scheme should be automatically started at a cluster node. Legal values are true or false. The default value is false.

<interceptors>

Optional

Specifies any number of event interceptors that process events for all caches of a specific distributed service.

<page-size>

Optional

The page-size element specifies the target page size.

<expiry-delay>

Optional

Specifies the amount of time since a value was published to a topic that it is available to be received by subscriber(s). An expired value is no longer accessible.

The value of this element must be in the following format:
(\d)+((.)(\d)+)?[MS|ms|S|s|M|m|H|h|D|d]?
where the first non-digits (from left to right) indicate the unit of time duration:
  • MS or ms (milliseconds)

  • S or s (seconds)

  • M or m (minutes)

  • H or h (hours)

  • D or d (days)

If the value does not contain a unit, a unit of seconds is assumed. A value of zero implies no expiry. The default value is 0.

Note:

The expiry delay parameter (cExpiryMillis) is defined as an integer and is expressed in milliseconds. Therefore, the maximum amount of time can never exceed Integer.MAX_VALUE (2147483647) milliseconds or approximately 24 days.

<high-units>

Optional

Specifies the size limit of the topic. The value represents the maximum number of bytes for the unprocessed values retained by the topic. Dependent on how the publisher is configured and its threads try-with-resource state, the next send could be throttled by flow control, fail on full or proceed to send values to the topic.

Valid values are positive integers and 0. The value of this element must be in the following format:

(\d)+[K|k|M|m|G|g|T|t]?[B|b]?

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

  • B or b (byte, 1)

  • K or k (kilo, 210)

  • M or m (mega, 220)

  • G or g (giga, 230)

  • T or t (tera, 240)

The default value is 0 and implies no limit. If the value exceeds Integer.MAX_VALUE, then a unit factor is automatically used to adjust the value accordingly. If the value does not contain a factor, a factor of one is assumed.

subscriber-group

Description

The subscriber-group element defines a durable subscription group for a topic-mapping.

Elements

Table C-2 describes the subelements of the subscriber-group element.

Table C-2 subscriber-group Subelements

Element Required/Optional Description

<name>

Required

Subscriber group name.

subscriber-groups

Used in: topic-mapping

Description

The subscriber-groups element enables defining one or more durable subscription group(s) in a topic-mapping. These groups will be created along with the topic and as such are ensured to exist before any data is published to the topic.

Elements

Table C-3 describes the subelements of the subscriber-groups element.

Table C-3 subscriber-groups Subelements

Element Required/Optional Description

<subscriber-group>

Required

One or more subscriber-group elements that define durable subscription group(s) for the topic-mapping.

topic-mapping

Description

Each topic-mapping element specifies the paged-topic-scheme what are to be used for a given topic name or topic name pattern used by an application.

Elements

Table C-4 describes the subelements of the topic-mapping element.

Table C-4 topic-mapping Subelements

Element Required/Optional Description

<topic-name>

Required

Specifies a topic name or name pattern. The name is unique within topics created by a cache factory. The slash (/) and colon (:) are reserved characters and cannot be used in cache names. The following topic name patterns are supported:
  • Exact match. For example, MyTopic.

  • Prefix match using a wildcard (prefix*). For example, My* that matches to any topic name starting with My.

  • Any match using a wildcard (*). Matches to any topic name.

If a topic name can be matched to multiple topic mappings, then exact matches are selected over wildcard matches. If no exact match is specified, then the last matching wildcard pattern (based on the order in which they are defined in the file) is selected.

<scheme-name>

Required

Contains the topic scheme name. The name is unique within a configuration file. Topic schemes are configured in caching-scheme element.

<value-type>

Optional

Specifies the fully-qualified name of the Java class for NamedTopic values.

<subscriber-groups>

Optional

The subscriber-group element enables defining one or more durable subscription group(s) in a topic-mapping. These groups will be created along with the topic and as such are ensured to exist before any data is published to the topic.

<init-params>

Optional

Allows specifying replaceable topic scheme parameters. During topic scheme parsing, any occurrence of any replaceable parameter in format param-name is replaced with the corresponding parameter value. Consider the following topic mapping example:
<topic-mapping> 
 <topic-name>My*</topic-name> 
 <scheme-name>my-scheme>/scheme-name>
 <value-type>String</value-type>
 <init-params>    
   <init-param>     
     <param-name>page-size</param-name>     
     <param-value>10MB</param-value>    
   </init-param> 
 </init-params>
</topic-mapping>

Any occurrence of the literal {page-size} will be replaced with the value of 10MB.

topic-scheme-mapping

Used in: cache-config

Description

Defines mappings between topic names, or name patterns, and a paged-topic-scheme.

Elements

Table C-5 describes the subelement you can define within the topic-scheme-mapping element.

Table C-5 topic-scheme-mapping Subelements

Element Required/Optional Description

<topic-mapping>

Optional

The topic-mapping element contains a single binding between a topic name and a topic scheme this topic will use.

topic-storage-type

Used in: paged-topic-scheme

Description

This enum type specifies the storage scheme used to hold topic values and metadata. Valid values are on-heap, flashjournal or ramjournal. Default value is on-heap.