Class ServiceRegistrySupport

java.lang.Object
com.illumon.iris.db.v2.routing.ServiceRegistrySupport

public final class ServiceRegistrySupport extends Object
Methods in support of dynamic port resolution and endpoint registration.
  • Constructor Details

    • ServiceRegistrySupport

      public ServiceRegistrySupport()
  • Method Details

    • determineServicePort

      public static int determineServicePort(@NotNull DataRoutingService.EndpointConfig endpointConfig)
      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 logger
      instanceName - the name of the service to register
      endpointConfig - the configuration of the endpoint
      actualPort - 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 logger
      instanceName - the name of the service to register
      endpointConfig - the configuration of the endpoint
      portTag - the port identifying tag
      actualPort - 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 logger
      instanceName - the name of the service to register