Class ThreadLocalRandomHandler

java.lang.Object
io.opencensus.implcore.trace.internal.RandomHandler
io.opentelemetry.opencensusshim.ThreadLocalRandomHandler

@ThreadSafe public final class ThreadLocalRandomHandler extends io.opencensus.implcore.trace.internal.RandomHandler
Implementation of the RandomHandler using ThreadLocalRandom. There is an existing implementation in opencensus-impl, however we do not want to depend on opencensus-impl here.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.opencensus.implcore.trace.internal.RandomHandler

    io.opencensus.implcore.trace.internal.RandomHandler.SecureRandomHandler
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new ThreadLocalRandomHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadLocalRandomHandler

      public ThreadLocalRandomHandler()
      Constructs a new ThreadLocalRandomHandler.
  • Method Details

    • current

      public Random current()
      Specified by:
      current in class io.opencensus.implcore.trace.internal.RandomHandler