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 TypeMethodDescriptioncom.fishlib.net.ConnectionMonitor.Params
void
Prevent any reconnection attempts.void
updateServerUsageFromInternalEvent
(PersistentQueryConfiguration config, boolean starting) 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) 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 start
-
getConnection
-
getOneShotConnectionOrNull
-
getDbConnectionMonitorParams
@NotNull public com.fishlib.net.ConnectionMonitor.Params getDbConnectionMonitorParams() -
getConfig
-