Class ThreadNum
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.nondeterministic.to_int.ThreadNum
- All Implemented Interfaces:
LongToIntFunction
Matches a digit sequence in the current thread name and caches it in a thread local.
This allows you to use any intentionally indexed thread factories to provide an analogue for
concurrency. Note that once the thread number is cached, it will not be refreshed. This means
you can't change the thread name and get an updated value.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ThreadNum
public ThreadNum()
-
-
Method Details
-
applyAsInt
public int applyAsInt(long value) - Specified by:
applyAsIntin interfaceLongToIntFunction
-