Package com.amazonaws.xray.entities
Class TraceID
- java.lang.Object
-
- com.amazonaws.xray.entities.TraceID
-
public class TraceID extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TraceID()
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
TraceID(long startTime)
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TraceID
create()
Returns a newTraceID
which represents the start of a new trace.static TraceID
create(AWSXRayRecorder creator)
Returns a newTraceID
which represents the start of a new trace.boolean
equals(@Nullable java.lang.Object obj)
static TraceID
fromString(java.lang.String xrayTraceId)
Returns theTraceID
parsed out of theString
.java.math.BigInteger
getNumber()
Deprecated.usegetNumberAsHex()
.java.lang.String
getNumberAsHex()
Returns the number component of thisTraceID
as a hexadecimal string.long
getStartTime()
Deprecated.UsegetStartTimeAsHex()
.java.lang.String
getStartTimeAsHex()
Returns the start time of thisTraceID
as a hexadecimal string representing the number of seconds since the epoch.int
hashCode()
static TraceID
invalid()
Returns an invalidTraceID
which can be used when an ID is needed outside the context of a trace, for example for an unsampled segment.void
setNumber(@Nullable java.math.BigInteger number)
Deprecated.TraceID is effectively immutable and this will be removedvoid
setStartTime(long startTime)
Deprecated.TraceID is effectively immutable and this will be removedjava.lang.String
toString()
-
-
-
Constructor Detail
-
TraceID
@Deprecated public TraceID()
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
TraceID
@Deprecated public TraceID(long startTime)
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
-
Method Detail
-
create
public static TraceID create()
Returns a newTraceID
which represents the start of a new trace. This new ID is generated according to the settings provided by the global AWSXRayRecorder instance returned byAWSXRay.getGlobalRecorder()
.- See Also:
create(AWSXRayRecorder)
-
create
public static TraceID create(AWSXRayRecorder creator)
Returns a newTraceID
which represents the start of a new trace. This new ID is generated according to the settings provided by the AWSXRayRecorder instance that created it.
-
fromString
public static TraceID fromString(java.lang.String xrayTraceId)
-
invalid
public static TraceID invalid()
Returns an invalidTraceID
which can be used when an ID is needed outside the context of a trace, for example for an unsampled segment.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getNumber
@Deprecated public java.math.BigInteger getNumber()
Deprecated.usegetNumberAsHex()
.- Returns:
- the number
-
getNumberAsHex
public java.lang.String getNumberAsHex()
Returns the number component of thisTraceID
as a hexadecimal string.
-
setNumber
@Deprecated public void setNumber(@Nullable java.math.BigInteger number)
Deprecated.TraceID is effectively immutable and this will be removed- Parameters:
number
- the number to set
-
getStartTime
public long getStartTime()
Deprecated.UsegetStartTimeAsHex()
.- Returns:
- the startTime
-
getStartTimeAsHex
public java.lang.String getStartTimeAsHex()
Returns the start time of thisTraceID
as a hexadecimal string representing the number of seconds since the epoch.
-
setStartTime
@Deprecated public void setStartTime(long startTime)
Deprecated.TraceID is effectively immutable and this will be removed- Parameters:
startTime
- the startTime to set
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-