Class ServiceRegistryServiceFactory

java.lang.Object
io.deephaven.registrysupport.routing.ServiceRegistryServiceFactory

public final class ServiceRegistryServiceFactory extends Object
Factory class that provides methods to invoke different ServiceRegistryService implementations.
  • Field Details

  • Constructor Details

    • ServiceRegistryServiceFactory

      public ServiceRegistryServiceFactory()
  • Method Details

    • getDefault

      @NotNull public static @NotNull ServiceRegistryService getDefault()
      Returns the cached ServiceRegistryService instance defined by the Global configuration instance.
    • resetDefaultInstance

      public static void resetDefaultInstance()
      Reset the INSTANCE singleton. Intended for testing.
    • getKvEtcdServiceRegistryService

      public static ServiceRegistryService getKvEtcdServiceRegistryService(@NotNull @NotNull com.fishlib.io.logger.Logger log, @NotNull @NotNull com.fishlib.configuration.Configuration configuration)
      Returns new etcd service implementation
      Parameters:
      log - The passed in logger
      configuration - The Configuration governing defaults
      Returns:
      The etcd service implementation
      Throws:
      ServiceRegistryServiceException - on failure to create the instance
    • getNullServiceRegistryService

      @TestUseOnly public static ServiceRegistryService getNullServiceRegistryService()
      Returns a new dummy ProcessRegistryService instance that does not support any of the primary functionality. Should be used where a valid instance is needed but not any of the core functionality.
      Returns:
      Dummy ProcessRegistryService implementation
      Throws:
      ServiceRegistryServiceException - on failure to create the instance
    • getRemoteServiceRegistryService

      public static ServiceRegistryService getRemoteServiceRegistryService()
      Returns new remote (grpc) service implementation
      Returns:
      Remote (grpc) service implementation
      Throws:
      ServiceRegistryServiceException - on failure to create the instance
    • getServiceRegistryService

      public static ServiceRegistryService getServiceRegistryService(@NotNull @NotNull String implClass)
      Returns new remote service implementation of the given class type.
      Parameters:
      implClass - the name of the implementation class to instantiate
      Returns:
      a service implementation
      Throws:
      ServiceRegistryServiceException - on failure to create the instance