Class ServiceRegistryServiceFactory
java.lang.Object
io.deephaven.registrysupport.routing.ServiceRegistryServiceFactory
Factory class that provides methods to invoke different
ServiceRegistryService implementations.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ServiceRegistryServiceReturns the cachedServiceRegistryServiceinstance defined by the Global configuration instance.static ServiceRegistryServicegetKvEtcdServiceRegistryService(@NotNull com.fishlib.io.logger.Logger log, @NotNull com.fishlib.configuration.Configuration configuration) Returns new etcd service implementationstatic ServiceRegistryServiceReturns a new dummy ProcessRegistryService instance that does not support any of the primary functionality.static ServiceRegistryServiceReturns new remote (grpc) service implementationstatic ServiceRegistryServicegetServiceRegistryService(@NotNull String implClass) Returns new remote service implementation of the given class type.static voidReset the INSTANCE singleton.
-
Field Details
-
DEFAULT_REGISTRY_SERVICE_CLASS_PROP
- See Also:
-
REGISTRY_SERVICE_CLASS_DEFAULT
- See Also:
-
-
Constructor Details
-
ServiceRegistryServiceFactory
public ServiceRegistryServiceFactory()
-
-
Method Details
-
getDefault
Returns the cachedServiceRegistryServiceinstance 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 loggerconfiguration- The Configuration governing defaults- Returns:
- The etcd service implementation
- Throws:
ServiceRegistryServiceException- on failure to create the instance
-
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
Returns new remote (grpc) service implementation- Returns:
- Remote (grpc) service implementation
- Throws:
ServiceRegistryServiceException- on failure to create the instance
-
getServiceRegistryService
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
-