Package com.illumon.iris.controller
Class ControllerDispatcherHandler
java.lang.Object
com.illumon.iris.controller.ControllerDispatcherHandler
Class to handle dispatcher details. One of these will be created for each dispatcher. We rely on the dispatcher to
tell us its current values when something changes. The only exception is that when a PQ is starting, we'll internally
account for it before the dispatcher is aware of any changes; this is to ensure that when multiple PQs start at the
same time, we can let a server selection provider know server utilization immediately.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionio.deephaven.enterprise.comm.ConnectionMonitor.Params
boolean
Is this dispatcher connected?void
onWorkerCompletion
(PersistentQueryConfiguration config, String workerProcessInfoId) When a worker is completed after startup, we need to be able to mark it as complete.void
Prevent any reconnection attempts.void
updateServerUsageFromInternalEvent
(PersistentQueryConfiguration config, boolean starting, String workerProcessInfoId) Update accounting from an internal PQ event.
-
Method Details
-
preventReconnection
public void preventReconnection()Prevent any reconnection attempts. Useful when the controller is shutting down. -
updateServerUsageFromInternalEvent
public void updateServerUsageFromInternalEvent(PersistentQueryConfiguration config, boolean starting, String workerProcessInfoId) Update accounting from an internal PQ event. This is always a PQ that's about to start, or a PQ that failed to start, possibly before even getting to the dispatcher (so there won't be a dispatcher accounting event for it). There will always be a notification for a PQ before it starts. If the PQ fails to start, the notification may come from an internal event, the dispatcher, or possibly both.- Parameters:
config
- the PQ configurationstarting
- true if it's starting, false if it failed to startworkerProcessInfoId
- the processInfoId of the worker
-
onWorkerCompletion
When a worker is completed after startup, we need to be able to mark it as complete.- Parameters:
config
- the persistent query configurationworkerProcessInfoId
- the process info ID of the worker
-
isConnected
public boolean isConnected()Is this dispatcher connected? -
getConnection
-
getOneShotConnectionOrNull
-
getDbConnectionMonitorParams
@NotNull public io.deephaven.enterprise.comm.ConnectionMonitor.Params getDbConnectionMonitorParams() -
getConfig
-