Package org.apache.druid.client
Class ImmutableDruidServer
java.lang.Object
org.apache.druid.client.ImmutableDruidServer
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 Summary
ConstructorsConstructorDescriptionImmutableDruidServer(DruidServerMetadata metadata, long currSize, com.google.common.collect.ImmutableMap<String, ImmutableDruidDataSource> dataSources, int numSegments) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonggetDataSource(String name) getHost()longgetName()intintgetSegment(SegmentId segmentId) getTier()getType()getURL()inthashCode()Returns a lazy collection with all segments in all data sources stored on this ImmutableDruidServer to be used for iteration orCollection.stream()transformation.toString()
-
Constructor Details
-
ImmutableDruidServer
public ImmutableDruidServer(DruidServerMetadata metadata, long currSize, com.google.common.collect.ImmutableMap<String, ImmutableDruidDataSource> dataSources, int numSegments)
-
-
Method Details
-
getName
-
getMetadata
-
getHost
-
getHostAndPort
-
getHostAndTlsPort
-
getCurrSize
public long getCurrSize() -
getMaxSize
public long getMaxSize() -
getType
-
getTier
-
getPriority
public int getPriority() -
getSegment
-
getDataSources
-
getDataSource
-
iterateAllSegments
Returns a lazy collection with all segments in all data sources stored on this ImmutableDruidServer to be used for iteration orCollection.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
-
toString
-
equals
-
hashCode
public int hashCode()
-