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 TraceIDcreate()Returns a newTraceIDwhich represents the start of a new trace.static TraceIDcreate(AWSXRayRecorder creator)Returns a newTraceIDwhich represents the start of a new trace.booleanequals(@Nullable java.lang.Object obj)static TraceIDfromString(java.lang.String xrayTraceId)Returns theTraceIDparsed out of theString.java.math.BigIntegergetNumber()Deprecated.usegetNumberAsHex().java.lang.StringgetNumberAsHex()Returns the number component of thisTraceIDas a hexadecimal string.longgetStartTime()Deprecated.UsegetStartTimeAsHex().java.lang.StringgetStartTimeAsHex()Returns the start time of thisTraceIDas a hexadecimal string representing the number of seconds since the epoch.inthashCode()static TraceIDinvalid()Returns an invalidTraceIDwhich can be used when an ID is needed outside the context of a trace, for example for an unsampled segment.voidsetNumber(@Nullable java.math.BigInteger number)Deprecated.TraceID is effectively immutable and this will be removedvoidsetStartTime(long startTime)Deprecated.TraceID is effectively immutable and this will be removedjava.lang.StringtoString()
-
-
-
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 newTraceIDwhich 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 newTraceIDwhich 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 invalidTraceIDwhich 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:
toStringin 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 thisTraceIDas 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 thisTraceIDas 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-