public class ImmutableDruidServer extends Object
- a mutable counterpart of this class| Constructor and Description |
|---|
ImmutableDruidServer(DruidServerMetadata metadata,
long currSize,
com.google.common.collect.ImmutableMap<String,ImmutableDruidDataSource> dataSources,
int numSegments) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getCurrSize() |
ImmutableDruidDataSource |
getDataSource(String name) |
Iterable<ImmutableDruidDataSource> |
getDataSources() |
String |
getHost() |
String |
getHostAndPort() |
String |
getHostAndTlsPort() |
long |
getMaxSize() |
DruidServerMetadata |
getMetadata() |
String |
getName() |
int |
getNumSegments() |
int |
getPriority() |
DataSegment |
getSegment(SegmentId segmentId) |
String |
getTier() |
ServerType |
getType() |
String |
getURL() |
int |
hashCode() |
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. |
String |
toString() |
public ImmutableDruidServer(DruidServerMetadata metadata, long currSize, com.google.common.collect.ImmutableMap<String,ImmutableDruidDataSource> dataSources, int numSegments)
public String getName()
public DruidServerMetadata getMetadata()
public String getHost()
public String getHostAndPort()
public String getHostAndTlsPort()
public long getCurrSize()
public long getMaxSize()
public ServerType getType()
public String getTier()
public int getPriority()
@Nullable public DataSegment getSegment(SegmentId segmentId)
public Iterable<ImmutableDruidDataSource> getDataSources()
public ImmutableDruidDataSource getDataSource(String name)
public Collection<DataSegment> iterateAllSegments()
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.public int getNumSegments()
public String getURL()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.