Package com.amazonaws.xray.entities
Class DummySubsegment
- java.lang.Object
-
- com.amazonaws.xray.entities.DummySubsegment
-
- All Implemented Interfaces:
Entity
,Subsegment
,java.lang.AutoCloseable
@Deprecated public class DummySubsegment extends java.lang.Object implements Subsegment
Deprecated.
-
-
Constructor Summary
Constructors Constructor Description DummySubsegment(AWSXRayRecorder creator)
Deprecated.DummySubsegment(AWSXRayRecorder creator, TraceID traceId)
Deprecated.DummySubsegment(AWSXRayRecorder creator, TraceID traceId, SamplingStrategyOverride samplingStrategyOverride)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addException(java.lang.Throwable exception)
Deprecated.Adds an exception to the entity's cause and sets fault to true.void
addPrecursorId(java.lang.String precursorId)
Deprecated.void
addSubsegment(Subsegment subsegment)
Deprecated.Adds a subsegment.void
close()
Deprecated.Implements theAutoCloseable
interface.boolean
compareAndSetEmitted(boolean current, boolean next)
Deprecated.Checks whether thisEntity
currently has emitted state ofcurrent
and if so, set emitted state tonext
.boolean
decrementReferenceCount()
Deprecated.Decrements the subsegment-reference counter.boolean
end()
Deprecated.Ends the subsegment.java.util.Map<java.lang.String,java.lang.Object>
getAnnotations()
Deprecated.java.util.Map<java.lang.String,java.lang.Object>
getAws()
Deprecated.Cause
getCause()
Deprecated.AWSXRayRecorder
getCreator()
Deprecated.double
getEndTime()
Deprecated.java.util.Map<java.lang.String,java.lang.Object>
getHttp()
Deprecated.java.lang.String
getId()
Deprecated.java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
getMetadata()
Deprecated.java.lang.String
getName()
Deprecated.java.lang.String
getNamespace()
Deprecated.Entity
getParent()
Deprecated.java.lang.String
getParentId()
Deprecated.Segment
getParentSegment()
Deprecated.java.util.Set<java.lang.String>
getPrecursorIds()
Deprecated.int
getReferenceCount()
Deprecated.Returns the reference count of the segment.SamplingStrategyOverride
getSamplingStrategyOverride()
Deprecated.java.util.Map<java.lang.String,java.lang.Object>
getSql()
Deprecated.double
getStartTime()
Deprecated.java.util.List<Subsegment>
getSubsegments()
Deprecated.java.util.List<Subsegment>
getSubsegmentsCopy()
Deprecated.Returns a copy of the currently added subsegments.java.util.concurrent.locks.ReentrantLock
getSubsegmentsLock()
Deprecated.java.util.concurrent.atomic.LongAdder
getTotalSize()
Deprecated.TraceID
getTraceId()
Deprecated.void
incrementReferenceCount()
Deprecated.Increments the subsegment-reference counter.boolean
isEmitted()
Deprecated.boolean
isError()
Deprecated.boolean
isFault()
Deprecated.boolean
isInProgress()
Deprecated.boolean
isRecording()
Deprecated.boolean
isSampled()
Deprecated.boolean
isThrottle()
Deprecated.java.lang.String
prettySerialize()
Deprecated.java.lang.String
prettyStreamSerialize()
Deprecated.Pretty-serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.void
putAllAws(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Puts AWS information.void
putAllHttp(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Puts HTTP information.void
putAllSql(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Puts SQL information.void
putAnnotation(java.lang.String key, java.lang.Boolean value)
Deprecated.Puts a Boolean annotation.void
putAnnotation(java.lang.String key, java.lang.Number value)
Deprecated.Puts a Number annotation.void
putAnnotation(java.lang.String key, java.lang.String value)
Deprecated.Puts a String annotation.void
putAws(java.lang.String key, java.lang.Object value)
Deprecated.Puts AWS information.void
putHttp(java.lang.String key, java.lang.Object value)
Deprecated.Puts HTTP information.void
putMetadata(java.lang.String key, java.lang.Object object)
Deprecated.Puts metadata under the namespace 'default'.void
putMetadata(java.lang.String namespace, java.lang.String key, java.lang.Object object)
Deprecated.Puts metadata.void
putSql(java.lang.String key, java.lang.Object value)
Deprecated.Puts SQL information.void
removeSubsegment(Subsegment subsegment)
Deprecated.Removes a subsegment from the subsegment list.java.lang.String
serialize()
Deprecated.void
setAnnotations(java.util.Map<java.lang.String,java.lang.Object> annotations)
Deprecated.void
setAws(java.util.Map<java.lang.String,java.lang.Object> aws)
Deprecated.void
setCreator(AWSXRayRecorder creator)
Deprecated.void
setEmitted(boolean emitted)
Deprecated.Sets emitted on the entity.void
setEndTime(double endTime)
Deprecated.void
setError(boolean error)
Deprecated.Sets the error value of the entity.void
setFault(boolean fault)
Deprecated.void
setHttp(java.util.Map<java.lang.String,java.lang.Object> http)
Deprecated.void
setId(java.lang.String id)
Deprecated.void
setInProgress(boolean inProgress)
Deprecated.void
setMetadata(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> metadata)
Deprecated.void
setNamespace(java.lang.String namespace)
Deprecated.void
setParent(Entity parent)
Deprecated.void
setParentId(@Nullable java.lang.String parentId)
Deprecated.void
setParentSegment(Segment parentSegment)
Deprecated.void
setPrecursorIds(java.util.Set<java.lang.String> precursorIds)
Deprecated.void
setSampledFalse()
Deprecated.void
setSql(java.util.Map<java.lang.String,java.lang.Object> sql)
Deprecated.void
setStartTime(double startTime)
Deprecated.void
setSubsegmentsLock(java.util.concurrent.locks.ReentrantLock subsegmentsLock)
Deprecated.void
setThrottle(boolean throttle)
Deprecated.Sets the throttle value.void
setTraceId(TraceID traceId)
Deprecated.boolean
shouldPropagate()
Deprecated.Determines if this subsegment should propagate its trace context downstreamjava.lang.String
streamSerialize()
Deprecated.Serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.
-
-
-
Constructor Detail
-
DummySubsegment
public DummySubsegment(AWSXRayRecorder creator)
Deprecated.
-
DummySubsegment
public DummySubsegment(AWSXRayRecorder creator, TraceID traceId)
Deprecated.
-
DummySubsegment
@Deprecated public DummySubsegment(AWSXRayRecorder creator, TraceID traceId, SamplingStrategyOverride samplingStrategyOverride)
Deprecated.
-
-
Method Detail
-
getId
public java.lang.String getId()
Deprecated.
-
setId
public void setId(java.lang.String id)
Deprecated.
-
getStartTime
public double getStartTime()
Deprecated.- Specified by:
getStartTime
in interfaceEntity
- Returns:
- the startTime
-
setStartTime
public void setStartTime(double startTime)
Deprecated.- Specified by:
setStartTime
in interfaceEntity
- Parameters:
startTime
- the startTime to set
-
getEndTime
public double getEndTime()
Deprecated.- Specified by:
getEndTime
in interfaceEntity
- Returns:
- the endTime
-
setEndTime
public void setEndTime(double endTime)
Deprecated.- Specified by:
setEndTime
in interfaceEntity
- Parameters:
endTime
- the endTime to set
-
isFault
public boolean isFault()
Deprecated.
-
setFault
public void setFault(boolean fault)
Deprecated.
-
isError
public boolean isError()
Deprecated.
-
setError
public void setError(boolean error)
Deprecated.Description copied from interface:Entity
Sets the error value of the entity.
-
getNamespace
public java.lang.String getNamespace()
Deprecated.- Specified by:
getNamespace
in interfaceEntity
- Specified by:
getNamespace
in interfaceSubsegment
- Returns:
- the namespace
-
setNamespace
public void setNamespace(java.lang.String namespace)
Deprecated.- Specified by:
setNamespace
in interfaceEntity
- Specified by:
setNamespace
in interfaceSubsegment
- Parameters:
namespace
- the namespace to set
-
getCause
public Cause getCause()
Deprecated.
-
getHttp
public java.util.Map<java.lang.String,java.lang.Object> getHttp()
Deprecated.
-
setHttp
public void setHttp(java.util.Map<java.lang.String,java.lang.Object> http)
Deprecated.
-
getAws
public java.util.Map<java.lang.String,java.lang.Object> getAws()
Deprecated.
-
setAws
public void setAws(java.util.Map<java.lang.String,java.lang.Object> aws)
Deprecated.
-
getSql
public java.util.Map<java.lang.String,java.lang.Object> getSql()
Deprecated.
-
setSql
public void setSql(java.util.Map<java.lang.String,java.lang.Object> sql)
Deprecated.
-
getMetadata
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getMetadata()
Deprecated.- Specified by:
getMetadata
in interfaceEntity
- Returns:
- the metadata
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> metadata)
Deprecated.- Specified by:
setMetadata
in interfaceEntity
- Parameters:
metadata
- the metadata to set
-
setAnnotations
public void setAnnotations(java.util.Map<java.lang.String,java.lang.Object> annotations)
Deprecated.- Specified by:
setAnnotations
in interfaceEntity
- Parameters:
annotations
- the annotations to set
-
getParent
public Entity getParent()
Deprecated.
-
setParent
public void setParent(Entity parent)
Deprecated.
-
isThrottle
public boolean isThrottle()
Deprecated.- Specified by:
isThrottle
in interfaceEntity
- Returns:
- the throttle
-
setThrottle
public void setThrottle(boolean throttle)
Deprecated.Description copied from interface:Entity
Sets the throttle value. When setting to true, error is also set to true and fault set to false.- Specified by:
setThrottle
in interfaceEntity
- Parameters:
throttle
- the throttle to set
-
isInProgress
public boolean isInProgress()
Deprecated.- Specified by:
isInProgress
in interfaceEntity
- Returns:
- the inProgress
-
setInProgress
public void setInProgress(boolean inProgress)
Deprecated.- Specified by:
setInProgress
in interfaceEntity
- Parameters:
inProgress
- the inProgress to set
-
getTraceId
public TraceID getTraceId()
Deprecated.- Specified by:
getTraceId
in interfaceEntity
- Returns:
- the traceId
-
setTraceId
public void setTraceId(TraceID traceId)
Deprecated.- Specified by:
setTraceId
in interfaceEntity
- Parameters:
traceId
- the traceId to set
-
getCreator
public AWSXRayRecorder getCreator()
Deprecated.- Specified by:
getCreator
in interfaceEntity
- Returns:
- the creator
-
setCreator
public void setCreator(AWSXRayRecorder creator)
Deprecated.- Specified by:
setCreator
in interfaceEntity
- Parameters:
creator
- the creator to set
-
getParentId
public java.lang.String getParentId()
Deprecated.- Specified by:
getParentId
in interfaceEntity
- Returns:
- the parentId
-
setParentId
public void setParentId(@Nullable java.lang.String parentId)
Deprecated.- Specified by:
setParentId
in interfaceEntity
- Parameters:
parentId
- the parentId to set
-
getSubsegments
public java.util.List<Subsegment> getSubsegments()
Deprecated.- Specified by:
getSubsegments
in interfaceEntity
- Returns:
- the subsegments
-
getSubsegmentsCopy
public java.util.List<Subsegment> getSubsegmentsCopy()
Deprecated.Description copied from interface:Entity
Returns a copy of the currently added subsegments. Updates to the returnedList
will not be reflected in theEntity
.- Specified by:
getSubsegmentsCopy
in interfaceEntity
-
addSubsegment
public void addSubsegment(Subsegment subsegment)
Deprecated.Description copied from interface:Entity
Adds a subsegment.- Specified by:
addSubsegment
in interfaceEntity
- Parameters:
subsegment
- the subsegment to add
-
addException
public void addException(java.lang.Throwable exception)
Deprecated.Description copied from interface:Entity
Adds an exception to the entity's cause and sets fault to true.- Specified by:
addException
in interfaceEntity
- Parameters:
exception
- the exception to add
-
putHttp
public void putHttp(java.lang.String key, java.lang.Object value)
Deprecated.Description copied from interface:Entity
Puts HTTP information.
-
putAllHttp
public void putAllHttp(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Description copied from interface:Entity
Puts HTTP information.- Specified by:
putAllHttp
in interfaceEntity
- Parameters:
all
- the HTTP information to put
-
putAws
public void putAws(java.lang.String key, java.lang.Object value)
Deprecated.Description copied from interface:Entity
Puts AWS information.
-
putAllAws
public void putAllAws(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Description copied from interface:Entity
Puts AWS information.
-
putSql
public void putSql(java.lang.String key, java.lang.Object value)
Deprecated.Description copied from interface:Entity
Puts SQL information.
-
putAllSql
public void putAllSql(java.util.Map<java.lang.String,java.lang.Object> all)
Deprecated.Description copied from interface:Entity
Puts SQL information.
-
putAnnotation
public void putAnnotation(java.lang.String key, java.lang.String value)
Deprecated.Description copied from interface:Entity
Puts a String annotation.- Specified by:
putAnnotation
in interfaceEntity
- Parameters:
key
- the key under which the annotation is storedvalue
- the String annotation
-
putAnnotation
public void putAnnotation(java.lang.String key, java.lang.Number value)
Deprecated.Description copied from interface:Entity
Puts a Number annotation.- Specified by:
putAnnotation
in interfaceEntity
- Parameters:
key
- the key under which the annotation is storedvalue
- the Number annotation
-
putAnnotation
public void putAnnotation(java.lang.String key, java.lang.Boolean value)
Deprecated.Description copied from interface:Entity
Puts a Boolean annotation.- Specified by:
putAnnotation
in interfaceEntity
- Parameters:
key
- the key under which the annotation is storedvalue
- the Boolean annotation
-
putMetadata
public void putMetadata(java.lang.String key, java.lang.Object object)
Deprecated.Description copied from interface:Entity
Puts metadata under the namespace 'default'.- Specified by:
putMetadata
in interfaceEntity
- Parameters:
key
- the key under which the metadata is storedobject
- the metadata
-
putMetadata
public void putMetadata(java.lang.String namespace, java.lang.String key, java.lang.Object object)
Deprecated.Description copied from interface:Entity
Puts metadata.- Specified by:
putMetadata
in interfaceEntity
- Parameters:
namespace
- the namespace under which the metadata is storedkey
- the key under which the metadata is storedobject
- the metadata
-
setEmitted
public void setEmitted(boolean emitted)
Deprecated.Description copied from interface:Entity
Sets emitted on the entity.- Specified by:
setEmitted
in interfaceEntity
-
compareAndSetEmitted
public boolean compareAndSetEmitted(boolean current, boolean next)
Deprecated.Description copied from interface:Entity
Checks whether thisEntity
currently has emitted state ofcurrent
and if so, set emitted state tonext
. Returnstrue
if the state was updated, orfalse
otherwise.- Specified by:
compareAndSetEmitted
in interfaceEntity
-
serialize
public java.lang.String serialize()
Deprecated.
-
prettySerialize
public java.lang.String prettySerialize()
Deprecated.- Specified by:
prettySerialize
in interfaceEntity
-
end
public boolean end()
Deprecated.Description copied from interface:Subsegment
Ends the subsegment. Sets the end time to the current time. Sets inProgress to false. Decrements its parent segment's segment-reference counter.- Specified by:
end
in interfaceSubsegment
- Returns:
- true if 1) the parent segment now has a ref. count of zero and 2) the parent segment is sampled
-
getAnnotations
public java.util.Map<java.lang.String,java.lang.Object> getAnnotations()
Deprecated.- Specified by:
getAnnotations
in interfaceEntity
- Returns:
- the annotations
-
getParentSegment
public Segment getParentSegment()
Deprecated.- Specified by:
getParentSegment
in interfaceEntity
- Specified by:
getParentSegment
in interfaceSubsegment
- Returns:
- the parentSegment
-
close
public void close()
Deprecated.Description copied from interface:Subsegment
Implements theAutoCloseable
interface. Warning. This method is intended to be private to the xray library and should not be used externally. Instead, useAWSXRay.endSubsegment(Subsegment)
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceSubsegment
-
setParentSegment
public void setParentSegment(Segment parentSegment)
Deprecated.- Specified by:
setParentSegment
in interfaceSubsegment
- Parameters:
parentSegment
- the parentSegment to set
-
getPrecursorIds
public java.util.Set<java.lang.String> getPrecursorIds()
Deprecated.- Specified by:
getPrecursorIds
in interfaceSubsegment
- Returns:
- the precursorIds
-
setPrecursorIds
public void setPrecursorIds(java.util.Set<java.lang.String> precursorIds)
Deprecated.- Specified by:
setPrecursorIds
in interfaceSubsegment
- Parameters:
precursorIds
- the precursorIds to set
-
addPrecursorId
public void addPrecursorId(java.lang.String precursorId)
Deprecated.- Specified by:
addPrecursorId
in interfaceSubsegment
- Parameters:
precursorId
- the precursor ID to add to the set
-
shouldPropagate
public boolean shouldPropagate()
Deprecated.Description copied from interface:Subsegment
Determines if this subsegment should propagate its trace context downstream- Specified by:
shouldPropagate
in interfaceSubsegment
- Returns:
- true if its trace context should be propagated downstream, false otherwise
-
streamSerialize
public java.lang.String streamSerialize()
Deprecated.Description copied from interface:Subsegment
Serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.- Specified by:
streamSerialize
in interfaceSubsegment
- Returns:
- the string representation of the subsegment with enough information for it to be streamed
-
prettyStreamSerialize
public java.lang.String prettyStreamSerialize()
Deprecated.Description copied from interface:Subsegment
Pretty-serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own. Only used for debugging.- Specified by:
prettyStreamSerialize
in interfaceSubsegment
- Returns:
- the pretty string representation of the subsegment with enough information for it to be streamed
-
getSubsegmentsLock
public java.util.concurrent.locks.ReentrantLock getSubsegmentsLock()
Deprecated.- Specified by:
getSubsegmentsLock
in interfaceEntity
- Returns:
- the subsegmentsLock
-
setSubsegmentsLock
public void setSubsegmentsLock(java.util.concurrent.locks.ReentrantLock subsegmentsLock)
Deprecated.- Specified by:
setSubsegmentsLock
in interfaceEntity
- Parameters:
subsegmentsLock
- the subsegmentsLock to set
-
getReferenceCount
public int getReferenceCount()
Deprecated.Description copied from interface:Entity
Returns the reference count of the segment. This number represents how many open subsegments are children of this segment. The segment is emitted when its reference count reaches 0.- Specified by:
getReferenceCount
in interfaceEntity
- Returns:
- the reference count
-
getTotalSize
public java.util.concurrent.atomic.LongAdder getTotalSize()
Deprecated.- Specified by:
getTotalSize
in interfaceEntity
- Returns:
- the totalSize
-
incrementReferenceCount
public void incrementReferenceCount()
Deprecated.Description copied from interface:Entity
Increments the subsegment-reference counter.- Specified by:
incrementReferenceCount
in interfaceEntity
-
decrementReferenceCount
public boolean decrementReferenceCount()
Deprecated.Description copied from interface:Entity
Decrements the subsegment-reference counter.- Specified by:
decrementReferenceCount
in interfaceEntity
- Returns:
- true if the segment is no longer in progress and the reference count is less than or equal to zero.
-
removeSubsegment
public void removeSubsegment(Subsegment subsegment)
Deprecated.Description copied from interface:Entity
Removes a subsegment from the subsegment list. Decrements the total size of the parentSegment. Marks the removed subsegment as emitted future modification on this subsegment may raise an AlreadyEmittedException.- Specified by:
removeSubsegment
in interfaceEntity
- Parameters:
subsegment
- the subsegment to remove
-
isRecording
public boolean isRecording()
Deprecated.- Specified by:
isRecording
in interfaceSubsegment
-
setSampledFalse
public void setSampledFalse()
Deprecated.- Specified by:
setSampledFalse
in interfaceSubsegment
-
getSamplingStrategyOverride
@Deprecated public SamplingStrategyOverride getSamplingStrategyOverride()
Deprecated.- Specified by:
getSamplingStrategyOverride
in interfaceSubsegment
-
-