Class ThreadNumToLong
- java.lang.Object
-
- io.virtdata.libbasics.shared.nondeterministic.ThreadNumToLong
-
- All Implemented Interfaces:
java.util.function.LongUnaryOperator
public class ThreadNumToLong extends java.lang.Object implements java.util.function.LongUnaryOperatorMatches 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 Constructor Description ThreadNumToLong()
-
Method Summary
Modifier and Type Method Description longapplyAsLong(long input)
-