Class SegmentImpl

    • Field Detail

      • resourceArn

        protected java.lang.String resourceArn
      • user

        protected java.lang.String user
      • origin

        protected java.lang.String origin
      • service

        protected java.util.Map<java.lang.String,​java.lang.Object> service
    • Constructor Detail

      • SegmentImpl

        public SegmentImpl​(AWSXRayRecorder creator,
                           java.lang.String name)
    • Method Detail

      • end

        public boolean end()
        Description copied from interface: Segment
        Ends the segment. Sets the end time to the current time. Sets inProgress to false.
        Specified by:
        end in interface Segment
        Returns:
        true if 1) the reference count is less than or equal to zero and 2) sampled is true
      • isRecording

        public boolean isRecording()
        Description copied from interface: Segment
        Returns if this Segment is recording events and will be emitted. Any operations on a Segment which is not recording are effectively no-op.
        Specified by:
        isRecording in interface Segment
      • isSampled

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

        public void setSampled​(boolean sampled)
        Specified by:
        setSampled in interface Segment
        Parameters:
        sampled - the sampled to set
      • getResourceArn

        public java.lang.String getResourceArn()
        Specified by:
        getResourceArn in interface Segment
        Returns:
        the resourceArn
      • setResourceArn

        public void setResourceArn​(java.lang.String resourceArn)
        Specified by:
        setResourceArn in interface Segment
        Parameters:
        resourceArn - the resourceArn to set
      • getUser

        public java.lang.String getUser()
        Specified by:
        getUser in interface Segment
        Returns:
        the user
      • setUser

        public void setUser​(java.lang.String user)
        Specified by:
        setUser in interface Segment
        Parameters:
        user - the user to set
      • getOrigin

        public java.lang.String getOrigin()
        Specified by:
        getOrigin in interface Segment
        Returns:
        the origin
      • setOrigin

        public void setOrigin​(java.lang.String origin)
        Specified by:
        setOrigin in interface Segment
        Parameters:
        origin - the origin to set
      • getService

        public java.util.Map<java.lang.String,​java.lang.Object> getService()
        Specified by:
        getService in interface Segment
        Returns:
        the service
      • setService

        public void setService​(java.util.Map<java.lang.String,​java.lang.Object> service)
        Specified by:
        setService in interface Segment
        Parameters:
        service - the service to set
      • putService

        public void putService​(java.lang.String key,
                               java.lang.Object object)
        Description copied from interface: Segment
        Puts information about this service.
        Specified by:
        putService in interface Segment
        Parameters:
        key - the key under which the service information is stored
        object - the service information
      • putAllService

        public void putAllService​(java.util.Map<java.lang.String,​java.lang.Object> all)
        Description copied from interface: Segment
        Puts information about this service.
        Specified by:
        putAllService in interface Segment
        Parameters:
        all - the service information to set.
      • setRuleName

        public void setRuleName​(java.lang.String ruleName)
        Specified by:
        setRuleName in interface Segment
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Segment