Package org.apache.druid.client
Interface TimelineServerView
-
- All Superinterfaces:
ServerView
- All Known Implementing Classes:
BrokerServerView
public interface TimelineServerView extends ServerView
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTimelineServerView.TimelineCallback-
Nested classes/interfaces inherited from interface org.apache.druid.client.ServerView
ServerView.BaseSegmentCallback, ServerView.CallbackAction, ServerView.SegmentCallback, ServerView.ServerRemovedCallback
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ImmutableDruidServer>getDruidServers()Returns a list ofImmutableDruidServer<T> org.apache.druid.query.QueryRunner<T>getQueryRunner(DruidServer server)Optional<? extends org.apache.druid.timeline.TimelineLookup<String,ServerSelector>>getTimeline(org.apache.druid.query.planning.DataSourceAnalysis analysis)Returns the timeline for a datasource, if it exists.voidregisterTimelineCallback(Executor exec, TimelineServerView.TimelineCallback callback)Register a callback for state changes in the timeline managed by this TimelineServerView.-
Methods inherited from interface org.apache.druid.client.ServerView
registerSegmentCallback, registerServerRemovedCallback
-
-
-
-
Method Detail
-
getTimeline
Optional<? extends org.apache.druid.timeline.TimelineLookup<String,ServerSelector>> getTimeline(org.apache.druid.query.planning.DataSourceAnalysis analysis)
Returns the timeline for a datasource, if it exists. The analysis object passed in must represent a scan-based datasource of a single table.- Parameters:
analysis- data source analysis information- Returns:
- timeline, if it exists
- Throws:
IllegalStateException- if 'analysis' does not represent a scan-based datasource of a single table
-
getDruidServers
List<ImmutableDruidServer> getDruidServers()
Returns a list ofImmutableDruidServer
-
getQueryRunner
<T> org.apache.druid.query.QueryRunner<T> getQueryRunner(DruidServer server)
-
registerTimelineCallback
void registerTimelineCallback(Executor exec, TimelineServerView.TimelineCallback callback)
Register a callback for state changes in the timeline managed by this TimelineServerView. The callback will be called after the relevant change is made to this TimelineServerView's timeline.- Parameters:
exec- executor in which to run the callbackcallback- the callback
-
-