Package com.amazonaws.xray.entities
Class SegmentImpl
- java.lang.Object
-
- com.amazonaws.xray.entities.EntityImpl
-
- com.amazonaws.xray.entities.SegmentImpl
-
public class SegmentImpl extends EntityImpl implements Segment
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringoriginprotected java.lang.StringresourceArnprotected java.util.Map<java.lang.String,java.lang.Object>serviceprotected java.lang.Stringuser-
Fields inherited from class com.amazonaws.xray.entities.EntityImpl
mapper, referenceCount, totalSize
-
-
Constructor Summary
Constructors Constructor Description SegmentImpl(AWSXRayRecorder creator, java.lang.String name)SegmentImpl(AWSXRayRecorder creator, java.lang.String name, TraceID traceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanend()Ends the segment.java.lang.StringgetOrigin()SegmentgetParentSegment()java.lang.StringgetResourceArn()java.util.Map<java.lang.String,java.lang.Object>getService()java.lang.StringgetUser()booleanisRecording()Returns if thisSegmentis recording events and will be emitted.booleanisSampled()voidputAllService(java.util.Map<java.lang.String,java.lang.Object> all)Puts information about this service.voidputService(java.lang.String key, java.lang.Object object)Puts information about this service.voidsetOrigin(java.lang.String origin)voidsetResourceArn(java.lang.String resourceArn)voidsetRuleName(java.lang.String ruleName)voidsetSampled(boolean sampled)voidsetService(java.util.Map<java.lang.String,java.lang.Object> service)voidsetUser(java.lang.String user)-
Methods inherited from class com.amazonaws.xray.entities.EntityImpl
addException, addSubsegment, checkAlreadyEmitted, compareAndSetEmitted, decrementReferenceCount, getAnnotations, getAws, getCause, getCreator, getEndTime, getHttp, getId, getMetadata, getName, getNamespace, getParent, getParentId, getReferenceCount, getSql, getStartTime, getSubsegments, getSubsegmentsCopy, getSubsegmentsLock, getTotalSize, getTraceId, incrementReferenceCount, isEmitted, isError, isFault, isInProgress, isThrottle, prettySerialize, putAllAws, putAllHttp, putAllSql, putAnnotation, putAnnotation, putAnnotation, putAws, putHttp, putMetadata, putMetadata, putSql, removeSubsegment, serialize, setAnnotations, setAws, setCreator, setEmitted, setEndTime, setError, setFault, setHttp, setId, setInProgress, setMetadata, setNamespace, setParent, setParentId, setSql, setStartTime, setSubsegmentsLock, setThrottle, setTraceId, validateNotNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.xray.entities.Entity
addException, addSubsegment, compareAndSetEmitted, decrementReferenceCount, getAws, getCause, getCreator, getEndTime, getHttp, getId, getMetadata, getName, getNamespace, getParent, getParentId, getReferenceCount, getSql, getStartTime, getSubsegments, getSubsegmentsCopy, getSubsegmentsLock, getTotalSize, getTraceId, incrementReferenceCount, isEmitted, isError, isFault, isInProgress, isThrottle, prettySerialize, putAllAws, putAllHttp, putAllSql, putAnnotation, putAnnotation, putAnnotation, putAws, putHttp, putMetadata, putMetadata, putSql, removeSubsegment, run, run, serialize, setAnnotations, setAws, setCreator, setEmitted, setEndTime, setError, setFault, setHttp, setId, setInProgress, setMetadata, setNamespace, setParent, setParentId, setSql, setStartTime, setSubsegmentsLock, setThrottle, setTraceId
-
Methods inherited from interface com.amazonaws.xray.entities.Segment
getAnnotations
-
-
-
-
Constructor Detail
-
SegmentImpl
public SegmentImpl(AWSXRayRecorder creator, java.lang.String name)
-
SegmentImpl
public SegmentImpl(AWSXRayRecorder creator, java.lang.String name, TraceID traceId)
-
-
Method Detail
-
end
public boolean end()
Description copied from interface:SegmentEnds the segment. Sets the end time to the current time. Sets inProgress to false.
-
isRecording
public boolean isRecording()
Description copied from interface:SegmentReturns if thisSegmentis recording events and will be emitted. Any operations on aSegmentwhich is not recording are effectively no-op.- Specified by:
isRecordingin interfaceSegment
-
setSampled
public void setSampled(boolean sampled)
- Specified by:
setSampledin interfaceSegment- Parameters:
sampled- the sampled to set
-
getResourceArn
public java.lang.String getResourceArn()
- Specified by:
getResourceArnin interfaceSegment- Returns:
- the resourceArn
-
setResourceArn
public void setResourceArn(java.lang.String resourceArn)
- Specified by:
setResourceArnin interfaceSegment- Parameters:
resourceArn- the resourceArn to set
-
getUser
public java.lang.String getUser()
-
setUser
public void setUser(java.lang.String user)
-
getOrigin
public java.lang.String getOrigin()
-
setOrigin
public void setOrigin(java.lang.String origin)
-
getService
public java.util.Map<java.lang.String,java.lang.Object> getService()
- Specified by:
getServicein interfaceSegment- Returns:
- the service
-
setService
public void setService(java.util.Map<java.lang.String,java.lang.Object> service)
- Specified by:
setServicein interfaceSegment- Parameters:
service- the service to set
-
putService
public void putService(java.lang.String key, java.lang.Object object)Description copied from interface:SegmentPuts information about this service.- Specified by:
putServicein interfaceSegment- Parameters:
key- the key under which the service information is storedobject- the service information
-
putAllService
public void putAllService(java.util.Map<java.lang.String,java.lang.Object> all)
Description copied from interface:SegmentPuts information about this service.- Specified by:
putAllServicein interfaceSegment- Parameters:
all- the service information to set.
-
setRuleName
public void setRuleName(java.lang.String ruleName)
- Specified by:
setRuleNamein interfaceSegment
-
getParentSegment
public Segment getParentSegment()
- Specified by:
getParentSegmentin interfaceEntity- Specified by:
getParentSegmentin interfaceSegment- Specified by:
getParentSegmentin classEntityImpl
-
-