Class BookmarkManagerConfig.BookmarkManagerConfigBuilder

java.lang.Object
org.neo4j.driver.BookmarkManagerConfig.BookmarkManagerConfigBuilder
Enclosing class:
BookmarkManagerConfig

public static final class BookmarkManagerConfig.BookmarkManagerConfigBuilder extends Object
Builder used to configure BookmarkManagerConfig which will be used to create a bookmark manager.
  • Method Details

    • withInitialBookmarks

      public BookmarkManagerConfig.BookmarkManagerConfigBuilder withInitialBookmarks(Set<Bookmark> initialBookmarks)
      Provide a map of initial bookmarks to initialise the bookmark manager.
      Parameters:
      initialBookmarks - initial set of bookmarks
      Returns:
      this builder
    • withBookmarksConsumer

      public BookmarkManagerConfig.BookmarkManagerConfigBuilder withBookmarksConsumer(Consumer<Set<Bookmark>> bookmarksConsumer)
      Provide bookmarks consumer.

      The consumer will be called outside bookmark manager's synchronisation lock.

      Parameters:
      bookmarksConsumer - bookmarks consumer
      Returns:
      this builder
    • withBookmarksSupplier

      public BookmarkManagerConfig.BookmarkManagerConfigBuilder withBookmarksSupplier(Supplier<Set<Bookmark>> bookmarksSupplier)
      Provide bookmarks supplier.

      The supplied bookmarks will be served alongside the bookmarks served by the bookmark manager. The supplied bookmarks will not be stored nor managed by the bookmark manager.

      The supplier will be called outside bookmark manager's synchronisation lock.

      Parameters:
      bookmarksSupplier - the bookmarks supplier
      Returns:
      this builder
    • build

      public BookmarkManagerConfig build()
      Builds an instance of BookmarkManagerConfig.
      Returns:
      the config