Package com.illumon.iris.db.v2.routing
Class ServiceRegistrySupport
java.lang.Object
com.illumon.iris.db.v2.routing.ServiceRegistrySupport
Methods in support of dynamic port resolution and endpoint registration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
deRegisterEndpoint
(com.fishlib.io.logger.Logger log, String instanceName) DeRegister the service endpoint from backing storestatic int
determineServicePort
(DataRoutingService.EndpointConfig endpointConfig) Determine the port this service instance should use.static void
maybeRegisterEndpoint
(com.fishlib.io.logger.Logger log, String instanceName, DataRoutingService.EndpointConfig endpointConfig, int actualPort) Register the service endpoint according to the endpoint's configuration.static void
maybeRegisterEndpoint
(com.fishlib.io.logger.Logger log, String instanceName, DataRoutingService.EndpointConfig endpointConfig, String portTag, int actualPort) Register the service endpoint according to the endpoint's configuration.
-
Constructor Details
-
ServiceRegistrySupport
public ServiceRegistrySupport()
-
-
Method Details
-
determineServicePort
Determine the port this service instance should use.- Parameters:
endpointConfig
- the endpoint configuration- Returns:
- the port to use
-
maybeRegisterEndpoint
public static void maybeRegisterEndpoint(@NotNull com.fishlib.io.logger.Logger log, @NotNull String instanceName, @NotNull DataRoutingService.EndpointConfig endpointConfig, int actualPort) Register the service endpoint according to the endpoint's configuration.- Parameters:
log
- the passed in loggerinstanceName
- the name of the service to registerendpointConfig
- the configuration of the endpointactualPort
- the actual port resolved
-
maybeRegisterEndpoint
public static void maybeRegisterEndpoint(@NotNull com.fishlib.io.logger.Logger log, @NotNull String instanceName, @NotNull DataRoutingService.EndpointConfig endpointConfig, @NotNull String portTag, int actualPort) Register the service endpoint according to the endpoint's configuration.- Parameters:
log
- the passed in loggerinstanceName
- the name of the service to registerendpointConfig
- the configuration of the endpointportTag
- the port identifying tagactualPort
- the actual port resolved
-
deRegisterEndpoint
public static void deRegisterEndpoint(@NotNull com.fishlib.io.logger.Logger log, @NotNull String instanceName) DeRegister the service endpoint from backing store- Parameters:
log
- the passed in loggerinstanceName
- the name of the service to register
-