urn:infinispan:config:counters:14.0

counters

NameTypeDefaultDescription
num-ownerspositiveInteger2 Specifies how many copies of the counter's value to create on the cluster. A smaller number results in faster update operations but supports a lower number of node crashes. You must specify a positive number as the value.
reliability
AVAILABLE All partitions can read and update counter values.
CONSISTENT The primary partition can read and update counter values. Other partitions can read values only if the counters are available in the partition.
AVAILABLE Controls how to handle counters when network partitions split clusters.

strong-counter

Configures strong consistent counters. The value of a strong counter is stored in a single key for consistency. During updates to the counter, the value is known. Updates to the counter value are performed under the key lock. Reads of the current value of the counter do not acquire any lock. Strong counters allow bounded values and atomic operations.

NameTypeDefaultDescription
lower-boundint Sets the lower bound, inclusively, for strong consistent counters. You must specify a value that is less than or equal to the "initial-value".
upper-boundint Sets the upper bound, inclusively, for strong consistent counters. You must specify a value that is greater than or equal to the "initial-value".
lifespanlong-1 (Experimental) Specifies the maximum amount of time, in milliseconds, that strong counters can remain in the cluster. Counters are removed from the cluster when they exceed the lifespan and are reset to their initial values. Setting a value of 0 (zero) or -1 means counters are never removed.
NameTypeDefaultDescription
nameID Specifies a unique name for each counter.
initial-valueint0 Specifies the initial value for counters. For bounded counters, the initial value must be between the upper-bound and lower-bound.
storage
VOLATILE Counter values are permanently deleted when clusters restart or stop. Both the value and configuration of on-demand counters are deleted and must be created again.
PERSISTENT Counter values are saved in persistent storage and are available after clusters restart or stop.
VOLATILE Controls how to store counters when you restart and stop clusters.

weak-counter

Configures weak consistent counters. The value of a weak counter is stored in multiple keys. Each key stores a partial state of the counter value and can be updated concurrently. During updates to the counter, the value is not known. Retrieving values for weak counters does not always return the most current value.

NameTypeDefaultDescription
concurrency-levelpositiveInteger16 Sets the maximum number of concurrent updates to weak counter values. You must specify a positive number as the value.
NameTypeDefaultDescription
nameID Specifies a unique name for each counter.
initial-valueint0 Specifies the initial value for counters. For bounded counters, the initial value must be between the upper-bound and lower-bound.
storage
VOLATILE Counter values are permanently deleted when clusters restart or stop. Both the value and configuration of on-demand counters are deleted and must be created again.
PERSISTENT Counter values are saved in persistent storage and are available after clusters restart or stop.
VOLATILE Controls how to store counters when you restart and stop clusters.
Expand/Collapse All