Interface ServiceProviderRegistry<T>

Type Parameters:
T - a service type
All Superinterfaces:
Registrar<T>

public interface ServiceProviderRegistry<T> extends Registrar<T>
A distributed registry of service providers. Allows capability to query which nodes can provide a given service.
Author:
Paul Ferraro
  • Method Details

    • getGroup

      Group getGroup()
      Returns the group with which to register service providers.
      Returns:
      a group
    • register

      ServiceProviderRegistration<T> register(T service)
      Registers the local node as providing the specified service.
      Specified by:
      register in interface Registrar<T>
      Parameters:
      service - a service to register
      Returns:
      a new service provider registration
    • register

      Registers the local node as providing the specified service, using the specified listener.
      Parameters:
      service - a service to register
      listener - a registry listener
      Returns:
      a new service provider registration
    • getProviders

      Set<Node> getProviders(T service)
      Returns the set of nodes that can provide the specified service.
      Parameters:
      service - a service to obtain providers for
      Returns:
      a set of nodes
    • getServices

      Set<T> getServices()
      Returns the complete list of services known to this registry.
      Returns:
      a set of services