Interface RegistrationClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ZKRegistrationClient

@LimitedPrivate @Evolving public interface RegistrationClient extends AutoCloseable
A registration client, which the bookkeeper client will use to interact with registration service.
  • Method Details

    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • getWritableBookies

      CompletableFuture<Versioned<Set<BookieId>>> getWritableBookies()
      Get the list of writable bookie identifiers.
      Returns:
      a future represents the list of writable bookies.
    • getAllBookies

      Get the list of all bookies identifiers.
      Returns:
      a future represents the list of all bookies.
    • getReadOnlyBookies

      CompletableFuture<Versioned<Set<BookieId>>> getReadOnlyBookies()
      Get the list of readonly bookie identifiers.
      Returns:
      a future represents the list of readonly bookies.
    • getBookieServiceInfo

      default CompletableFuture<Versioned<BookieServiceInfo>> getBookieServiceInfo(BookieId bookieId)
      Get detailed information about the services exposed by a Bookie. For old bookies it is expected to return an empty BookieServiceInfo structure.
      Parameters:
      bookieId - this is the id of the bookie, it can be computed from a BookieId
      Returns:
      a future represents the available information.
      Since:
      4.11
    • watchWritableBookies

      Watch the changes of bookies.

      The topology changes of bookies will be propagated to the provided listener.

      Parameters:
      listener - listener to receive the topology changes of bookies.
      Returns:
      a future which completes when the bookies have been read for the first time
    • unwatchWritableBookies

      void unwatchWritableBookies(RegistrationClient.RegistrationListener listener)
      Unwatch the changes of bookies.
      Parameters:
      listener - listener to receive the topology changes of bookies.
    • watchReadOnlyBookies

      Watch the changes of bookies.

      The topology changes of bookies will be propagated to the provided listener.

      Parameters:
      listener - listener to receive the topology changes of bookies.
      Returns:
      a future which completes when the bookies have been read for the first time
    • unwatchReadOnlyBookies

      void unwatchReadOnlyBookies(RegistrationClient.RegistrationListener listener)
      Unwatch the changes of bookies.
      Parameters:
      listener - listener to receive the topology changes of bookies.