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.
Name | Type | Default | Description |
lower-bound | int | |
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-bound | int | |
Sets the upper bound, inclusively, for strong consistent counters.
You must specify a value that is greater than or equal to the "initial-value".
|
lifespan | long | -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.
|
Name | Type | Default | Description |
name | ID | |
Specifies a unique name for each counter.
|
initial-value | int | 0 |
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.
|