Package org.apache.druid.client
Class DruidDataSource
java.lang.Object
org.apache.druid.client.DruidDataSource
A mutable collection of metadata of segments (
DataSegment objects), belonging to a particular data source.
Concurrency: could be updated concurrently via addSegment(org.apache.druid.timeline.DataSegment), removeSegment(org.apache.druid.timeline.SegmentId), and removeSegmentsIf(java.util.function.Predicate<org.apache.druid.timeline.DataSegment>), and accessed concurrently (e. g. via getSegments()) as well.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSegment(DataSegment dataSegment) booleanaddSegmentIfAbsent(DataSegment dataSegment) Returns true if the segment was added, false if a segment with the sameSegmentIdalready existed in this DruidDataSource.booleangetName()getSegment(SegmentId segmentId) inthashCode()booleanisEmpty()removeSegment(SegmentId segmentId) Returns the removed segment, or null if there was no segment with the givenSegmentIdin this DruidDataSource.voidremoveSegmentsIf(Predicate<DataSegment> filter) Removes segments for which the given filter returns true.toString()
-
Constructor Details
-
DruidDataSource
-
-
Method Details
-
getName
-
getProperties
-
getSegment
-
getSegments
-
removeSegmentsIf
Removes segments for which the given filter returns true. -
addSegment
-
addSegmentIfAbsent
Returns true if the segment was added, false if a segment with the sameSegmentIdalready existed in this DruidDataSource. -
removeSegment
Returns the removed segment, or null if there was no segment with the givenSegmentIdin this DruidDataSource. -
isEmpty
public boolean isEmpty() -
toImmutableDruidDataSource
-
toString
-
equals
-
hashCode
public int hashCode()
-