Class ImmutableDruidServer

java.lang.Object
org.apache.druid.client.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:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getMetadata

      public DruidServerMetadata getMetadata()
    • getHost

      public String getHost()
    • getHostAndPort

      public String getHostAndPort()
    • getHostAndTlsPort

      public String getHostAndTlsPort()
    • getCurrSize

      public long getCurrSize()
    • getMaxSize

      public long getMaxSize()
    • getType

      public ServerType getType()
    • getTier

      public String getTier()
    • getPriority

      public int getPriority()
    • getSegment

      @Nullable public DataSegment getSegment(SegmentId segmentId)
    • getDataSources

      public Iterable<ImmutableDruidDataSource> getDataSources()
    • getDataSource

      public ImmutableDruidDataSource getDataSource(String name)
    • iterateAllSegments

      public Collection<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()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object