Class SubsegmentImpl

    • Method Detail

      • end

        public boolean end()
        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 interface Subsegment
        Returns:
        true if 1) the parent segment now has a ref. count of zero and 2) the parent segment is sampled
      • setParentSegment

        public void setParentSegment​(Segment parentSegment)
        Specified by:
        setParentSegment in interface Subsegment
        Parameters:
        parentSegment - the parentSegment to set
      • addPrecursorId

        public void addPrecursorId​(java.lang.String precursorId)
        Specified by:
        addPrecursorId in interface Subsegment
        Parameters:
        precursorId - the precursor ID to add to the set
      • getPrecursorIds

        public java.util.Set<java.lang.String> getPrecursorIds()
        Specified by:
        getPrecursorIds in interface Subsegment
        Returns:
        the precursorIds
      • setPrecursorIds

        public void setPrecursorIds​(java.util.Set<java.lang.String> precursorIds)
        Specified by:
        setPrecursorIds in interface Subsegment
        Parameters:
        precursorIds - the precursorIds to set
      • shouldPropagate

        public boolean shouldPropagate()
        Description copied from interface: Subsegment
        Determines if this subsegment should propagate its trace context downstream
        Specified by:
        shouldPropagate in interface Subsegment
        Returns:
        true if its trace context should be propagated downstream, false otherwise
      • streamSerialize

        public java.lang.String streamSerialize()
        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 interface Subsegment
        Returns:
        the string representation of the subsegment with enough information for it to be streamed
      • prettyStreamSerialize

        public java.lang.String prettyStreamSerialize()
        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 interface Subsegment
        Returns:
        the pretty string representation of the subsegment with enough information for it to be streamed
      • close

        public void close()
        Description copied from interface: Subsegment
        Implements the AutoCloseable interface. Warning. This method is intended to be private to the xray library and should not be used externally. Instead, use AWSXRay.endSubsegment(Subsegment).
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Subsegment
      • isSampled

        public boolean isSampled()
        Specified by:
        isSampled in interface Entity