public class DummySubsegment extends Object implements Subsegment
Constructor and Description |
---|
DummySubsegment(AWSXRayRecorder creator) |
DummySubsegment(AWSXRayRecorder creator,
TraceID traceId) |
Modifier and Type | Method and Description |
---|---|
void |
addException(Throwable exception)
Adds an exception to the entity's cause and sets fault to true.
|
void |
addPrecursorId(String precursorId) |
void |
addSubsegment(Subsegment subsegment)
Adds a subsegment.
|
void |
close() |
boolean |
decrementReferenceCount()
Decrements the subsegment-reference counter.
|
boolean |
end()
Ends the subsegment.
|
Map<String,Object> |
getAnnotations() |
Map<String,Object> |
getAws() |
Cause |
getCause() |
AWSXRayRecorder |
getCreator() |
double |
getEndTime() |
Map<String,Object> |
getHttp() |
String |
getId() |
Map<String,Map<String,Object>> |
getMetadata() |
String |
getName() |
String |
getNamespace() |
Entity |
getParent() |
String |
getParentId() |
Segment |
getParentSegment() |
Set<String> |
getPrecursorIds() |
int |
getReferenceCount()
Returns the reference count of the segment.
|
Map<String,Object> |
getSql() |
double |
getStartTime() |
List<Subsegment> |
getSubsegments() |
ReentrantLock |
getSubsegmentsLock() |
LongAdder |
getTotalSize() |
TraceID |
getTraceId() |
void |
incrementReferenceCount()
Increments the subsegment-reference counter.
|
boolean |
isEmitted() |
boolean |
isError() |
boolean |
isFault() |
boolean |
isInProgress() |
boolean |
isThrottle() |
String |
prettySerialize() |
String |
prettyStreamSerialize()
Pretty-serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.
|
void |
putAllAws(Map<String,Object> all)
Puts AWS information.
|
void |
putAllHttp(Map<String,Object> all)
Puts HTTP information.
|
void |
putAllSql(Map<String,Object> all)
Puts SQL information.
|
void |
putAnnotation(String key,
Boolean value)
Puts a Boolean annotation.
|
void |
putAnnotation(String key,
Number value)
Puts a Number annotation.
|
void |
putAnnotation(String key,
String value)
Puts a String annotation.
|
void |
putAws(String key,
Object value)
Puts AWS information.
|
void |
putHttp(String key,
Object value)
Puts HTTP information.
|
void |
putMetadata(String key,
Object object)
Puts metadata under the namespace 'default'.
|
void |
putMetadata(String namespace,
String key,
Object object)
Puts metadata.
|
void |
putSql(String key,
Object value)
Puts SQL information.
|
void |
removeSubsegment(Subsegment subsegment)
Removes a subsegment from the subsegment list.
|
String |
serialize() |
void |
setAnnotations(Map<String,Object> annotations) |
void |
setAws(Map<String,Object> aws) |
void |
setCreator(AWSXRayRecorder creator) |
void |
setEmitted(boolean emitted) |
void |
setEndTime(double endTime) |
void |
setError(boolean error)
Sets the error value of the entity.
|
void |
setFault(boolean fault) |
void |
setHttp(Map<String,Object> http) |
void |
setId(String id) |
void |
setInProgress(boolean inProgress) |
void |
setMetadata(Map<String,Map<String,Object>> metadata) |
void |
setNamespace(String namespace) |
void |
setParent(Entity parent) |
void |
setParentId(String parentId) |
void |
setParentSegment(Segment parentSegment) |
void |
setPrecursorIds(Set<String> precursorIds) |
void |
setSql(Map<String,Object> sql) |
void |
setStartTime(double startTime) |
void |
setSubsegmentsLock(ReentrantLock subsegmentsLock) |
void |
setThrottle(boolean throttle)
Sets the throttle value.
|
void |
setTraceId(TraceID traceId) |
String |
streamSerialize()
Serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateId
public DummySubsegment(AWSXRayRecorder creator)
public DummySubsegment(AWSXRayRecorder creator, TraceID traceId)
public void setId(String id)
public double getStartTime()
getStartTime
in interface Entity
public void setStartTime(double startTime)
setStartTime
in interface Entity
startTime
- the startTime to setpublic double getEndTime()
getEndTime
in interface Entity
public void setEndTime(double endTime)
setEndTime
in interface Entity
endTime
- the endTime to setpublic void setFault(boolean fault)
public void setError(boolean error)
Entity
public String getNamespace()
getNamespace
in interface Entity
getNamespace
in interface Subsegment
public void setNamespace(String namespace)
setNamespace
in interface Entity
setNamespace
in interface Subsegment
namespace
- the namespace to setpublic Map<String,Map<String,Object>> getMetadata()
getMetadata
in interface Entity
public void setMetadata(Map<String,Map<String,Object>> metadata)
setMetadata
in interface Entity
metadata
- the metadata to setpublic void setAnnotations(Map<String,Object> annotations)
setAnnotations
in interface Entity
annotations
- the annotations to setpublic void setParent(Entity parent)
public boolean isThrottle()
isThrottle
in interface Entity
public void setThrottle(boolean throttle)
Entity
setThrottle
in interface Entity
throttle
- the throttle to setpublic boolean isInProgress()
isInProgress
in interface Entity
public void setInProgress(boolean inProgress)
setInProgress
in interface Entity
inProgress
- the inProgress to setpublic TraceID getTraceId()
getTraceId
in interface Entity
public void setTraceId(TraceID traceId)
setTraceId
in interface Entity
traceId
- the traceId to setpublic AWSXRayRecorder getCreator()
getCreator
in interface Entity
public void setCreator(AWSXRayRecorder creator)
setCreator
in interface Entity
creator
- the creator to setpublic String getParentId()
getParentId
in interface Entity
public void setParentId(String parentId)
setParentId
in interface Entity
parentId
- the parentId to setpublic List<Subsegment> getSubsegments()
getSubsegments
in interface Entity
public void addSubsegment(Subsegment subsegment)
Entity
addSubsegment
in interface Entity
subsegment
- the subsegment to addpublic void addException(Throwable exception)
Entity
addException
in interface Entity
exception
- the exception to addpublic void putHttp(String key, Object value)
Entity
public void putAllHttp(Map<String,Object> all)
Entity
putAllHttp
in interface Entity
all
- the HTTP information to putpublic void putAws(String key, Object value)
Entity
public void putAllAws(Map<String,Object> all)
Entity
public void putSql(String key, Object value)
Entity
public void putAllSql(Map<String,Object> all)
Entity
public void putAnnotation(String key, String value)
Entity
putAnnotation
in interface Entity
key
- the key under which the annotation is storedvalue
- the String annotationpublic void putAnnotation(String key, Number value)
Entity
putAnnotation
in interface Entity
key
- the key under which the annotation is storedvalue
- the Number annotationpublic void putAnnotation(String key, Boolean value)
Entity
putAnnotation
in interface Entity
key
- the key under which the annotation is storedvalue
- the Boolean annotationpublic void putMetadata(String key, Object object)
Entity
putMetadata
in interface Entity
key
- the key under which the metadata is storedobject
- the metadatapublic void putMetadata(String namespace, String key, Object object)
Entity
putMetadata
in interface Entity
namespace
- the namespace under which the metadata is storedkey
- the key under which the metadata is storedobject
- the metadatapublic void setEmitted(boolean emitted)
setEmitted
in interface Entity
public String prettySerialize()
prettySerialize
in interface Entity
public boolean end()
Subsegment
end
in interface Subsegment
public Map<String,Object> getAnnotations()
getAnnotations
in interface Entity
public Segment getParentSegment()
getParentSegment
in interface Entity
getParentSegment
in interface Subsegment
public void close()
close
in interface Subsegment
close
in interface AutoCloseable
public void setParentSegment(Segment parentSegment)
setParentSegment
in interface Subsegment
parentSegment
- the parentSegment to setpublic Set<String> getPrecursorIds()
getPrecursorIds
in interface Subsegment
public void setPrecursorIds(Set<String> precursorIds)
setPrecursorIds
in interface Subsegment
precursorIds
- the precursorIds to setpublic void addPrecursorId(String precursorId)
addPrecursorId
in interface Subsegment
precursorId
- the precursor ID to add to the setpublic String streamSerialize()
Subsegment
streamSerialize
in interface Subsegment
public String prettyStreamSerialize()
Subsegment
prettyStreamSerialize
in interface Subsegment
public ReentrantLock getSubsegmentsLock()
getSubsegmentsLock
in interface Entity
public void setSubsegmentsLock(ReentrantLock subsegmentsLock)
setSubsegmentsLock
in interface Entity
subsegmentsLock
- the subsegmentsLock to setpublic int getReferenceCount()
Entity
getReferenceCount
in interface Entity
public LongAdder getTotalSize()
getTotalSize
in interface Entity
public void incrementReferenceCount()
Entity
incrementReferenceCount
in interface Entity
public boolean decrementReferenceCount()
Entity
decrementReferenceCount
in interface Entity
public void removeSubsegment(Subsegment subsegment)
Entity
removeSubsegment
in interface Entity
subsegment
- the subsegment to removeCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.