Class ImmutableDruidServer


  • public class ImmutableDruidServer
    extends Object
    This class should not be subclassed, it isn't declared final only to make it possible to mock the class with EasyMock in tests.
    See Also:
    - a mutable counterpart of this class
    • Method Detail

      • getName

        public String getName()
      • getHost

        public String getHost()
      • getHostAndPort

        public String getHostAndPort()
      • getHostAndTlsPort

        public String getHostAndTlsPort()
      • getCurrSize

        public long getCurrSize()
      • getMaxSize

        public long getMaxSize()
      • getTier

        public String getTier()
      • getPriority

        public int getPriority()
      • getSegment

        @Nullable
        public org.apache.druid.timeline.DataSegment getSegment​(org.apache.druid.timeline.SegmentId segmentId)
      • iterateAllSegments

        public Collection<org.apache.druid.timeline.DataSegment> iterateAllSegments()
        Returns a lazy collection with all segments in all data sources stored on this ImmutableDruidServer to be used for iteration or Collection.stream() transformation. The order of segments in this collection is unspecified. Note: iteration over the returned collection may not be as trivially cheap as, for example, iteration over an ArrayList. Try (to some reasonable extent) to organize the code so that it iterates the returned collection only once rather than several times.
      • getNumSegments

        public int getNumSegments()
      • getURL

        public String getURL()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object