Class DefaultStreamingStrategy

    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultStreamingStrategy()
      Constructs an instance of DefaultStreamingStrategy using the default maxSegmentSize of 100.
      DefaultStreamingStrategy​(int maxSegmentSize)
      Constructs an instance of DefaultStreamingStrategy using the provided maxSegmentSize.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getMaxSegmentSize()  
      boolean requiresStreaming​(Segment segment)
      Determines whether or not the provided segment requires any subsegment streaming.
      void streamSome​(Entity entity, Emitter emitter)
      Streams (and removes) some subsegment children from the provided segment or subsegment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultStreamingStrategy

        public DefaultStreamingStrategy()
        Constructs an instance of DefaultStreamingStrategy using the default maxSegmentSize of 100.
      • DefaultStreamingStrategy

        public DefaultStreamingStrategy​(int maxSegmentSize)
        Constructs an instance of DefaultStreamingStrategy using the provided maxSegmentSize.
        Parameters:
        maxSegmentSize - the maximum number of subsegment nodes a segment tree may have before requiresStreaming will return true
        Throws:
        java.lang.IllegalArgumentException - when maxSegmentSize is a negative integer
    • Method Detail

      • getMaxSegmentSize

        public int getMaxSegmentSize()
      • requiresStreaming

        public boolean requiresStreaming​(Segment segment)
        Determines whether or not the provided segment requires any subsegment streaming. Indicates that the provided segment requires streaming when it has been marked for sampling and its tree of subsegments reaches a size greater than maxSegmentSize.
        Specified by:
        requiresStreaming in interface StreamingStrategy
        Parameters:
        segment - the segment to inspect
        Returns:
        true if the segment should be streaming.
        See Also:
        StreamingStrategy.requiresStreaming(Segment)
      • streamSome

        public void streamSome​(Entity entity,
                               Emitter emitter)
        Streams (and removes) some subsegment children from the provided segment or subsegment. Performs Subtree Subsegment Streaming to stream completed subsegment subtrees. Serializes these subtrees of subsegments, streams them to the daemon, and removes them from their parents.
        Specified by:
        streamSome in interface StreamingStrategy
        Parameters:
        entity - the segment or subsegment to stream children from
        emitter - the emitter to send the child subsegments to
        See Also:
        StreamingStrategy.streamSome(Entity,Emitter)