Package com.amazonaws.xray.internal
Class IdGenerator
- java.lang.Object
-
- com.amazonaws.xray.internal.IdGenerator
-
- Direct Known Subclasses:
FastIdGenerator
,SecureIdGenerator
public abstract class IdGenerator extends java.lang.Object
An internal base class for unifying the potential ID generators.This class is internal-only and its API may receive breaking changes at any time. Do not directly depend on or use this class.
-
-
Constructor Summary
Constructors Constructor Description IdGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract long
getRandomEntityId()
java.lang.String
newEntityId()
abstract java.lang.String
newTraceId()
-
-
-
Method Detail
-
newTraceId
public abstract java.lang.String newTraceId()
- Returns:
- a new ID suitable for use in a
TraceID
-
newEntityId
public final java.lang.String newEntityId()
- Returns:
- a new ID suitable for use in any
Entity
implementation
-
getRandomEntityId
protected abstract long getRandomEntityId()
- Returns:
- a random long to use as an entity ID
-
-