@Internal public interface BoundedTrie extends Metric
A metric that represents a bounded trie data structure. This interface extends the Metric
interface and provides methods for adding string sequences (paths) to the trie.
The trie is bounded in size (max=100), meaning it has a maximum capacity for storing paths. When the trie reaches its capacity, it truncates paths. This is useful for tracking and aggregating a large number of distinct paths while limiting memory usage. It is not necessary but recommended that parts of paths provided as strings are hierarchical in nature so the truncation reduces granularity rather than complete data loss.
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Iterable<java.lang.String> values)
Adds a path to the trie.
|
default void |
add(java.lang.String... values)
Adds a path to the trie.
|
void add(java.lang.Iterable<java.lang.String> values)
values
- The segments of the path to add.default void add(java.lang.String... values)
values
- The segments of the path to add.