Class Concat

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_string.Concat
All Implemented Interfaces:
LongFunction<String>
Direct Known Subclasses:
ConcatArray, ConcatChained, ConcatCycle, ConcatFixed, ConcatHashed, ConcatStepped

public class Concat extends Object implements LongFunction<String>

This is the core implementation of the Concat style of String binding. It is the newer and recommended version of Template.

Users should use one of these wrappers:


This implementation is available for specialized use when needed, but the above versions are much more self-explanatory and easy to use.

As with previous implementations, the basic input which is fed to the functions is the sum of the input cycle and the step, where the step is simply the index of the insertion point within the template string. These start at 0, so a template string which contains "{}-{}" will have two steps, 0, and 1. For cycle 35, the first function will take input 35, and the second 36. This can create some local neighborhood similarity in test data, so other forms are provided which can hash the values for an added degree of (effective) randomness and one that chains these so that each set of values from a Concat binding are quite distinct from each other.


Binding functions used to populate each step of the template may have their own bounds of output values like Combinations. These are easy to use internally since they work well with the hashing. However, some other functions may operate over the whole space of long values, and come with no built-in cardinality constraints. It is recommended to use those with built-in constraints when you want to render a discrete population of values.