Module org.neo4j.driver
Package org.neo4j.driver
Class BookmarkManagerConfig.BookmarkManagerConfigBuilder
java.lang.Object
org.neo4j.driver.BookmarkManagerConfig.BookmarkManagerConfigBuilder
- Enclosing class:
- BookmarkManagerConfig
Builder used to configure
BookmarkManagerConfig
which will be used to create a bookmark manager.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance ofBookmarkManagerConfig
.withBookmarksConsumer
(Consumer<Set<Bookmark>> bookmarksConsumer) Provide bookmarks consumer.withBookmarksSupplier
(Supplier<Set<Bookmark>> bookmarksSupplier) Provide bookmarks supplier.withInitialBookmarks
(Set<Bookmark> initialBookmarks) Provide a map of initial bookmarks to initialise the 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
Builds an instance ofBookmarkManagerConfig
.- Returns:
- the config
-