Class FastIdGenerator

java.lang.Object
com.amazonaws.xray.internal.IdGenerator
com.amazonaws.xray.internal.FastIdGenerator

public final class FastIdGenerator
extends IdGenerator
Generates random IDs using a fast but cryptographically insecure random number generator. This should be the default random generator, unless your application relies on AWS X-Ray trace IDs being generated from a cryptographically secure random number source.

This class is internal-only and its API may receive breaking changes at any time. Do not directly depend on or use this class.

See Also:
SecureIdGenerator
  • Constructor Summary

    Constructors
    Constructor Description
    FastIdGenerator()  
  • Method Summary

    Modifier and Type Method Description
    protected long getRandomEntityId()  
    java.lang.String newTraceId()  

    Methods inherited from class com.amazonaws.xray.internal.IdGenerator

    newEntityId

    Methods inherited from class java.lang.Object

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

    • FastIdGenerator

      public FastIdGenerator()
  • Method Details

    • newTraceId

      public java.lang.String newTraceId()
      Specified by:
      newTraceId in class IdGenerator
      Returns:
      a new ID suitable for use in a TraceID
    • getRandomEntityId

      protected long getRandomEntityId()
      Specified by:
      getRandomEntityId in class IdGenerator
      Returns:
      a random long to use as an entity ID