Interface ReactiveDatabaseSelectionProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@API(status=STABLE,
since="6.0")
@FunctionalInterface
public interface ReactiveDatabaseSelectionProvider
This is the reactive version of a the
DatabaseSelectionProvider
and it works in the same way but uses
reactive return types containing the target database name. An empty mono indicates the default database.- Since:
- 6.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptioncreateStaticDatabaseSelectionProvider
(String databaseName) Creates a statically configured database selection provider always selecting the database with the given namedatabaseName
.reactor.core.publisher.Mono<DatabaseSelection>
A database selector always selecting the default database.
-
Method Details
-
getDatabaseSelection
reactor.core.publisher.Mono<DatabaseSelection> getDatabaseSelection()- Returns:
- The selected database to interact with.
-
createStaticDatabaseSelectionProvider
Creates a statically configured database selection provider always selecting the database with the given namedatabaseName
.- Parameters:
databaseName
- The database name to use, must not be null nor empty.- Returns:
- A statically configured database name provider.
-
getDefaultSelectionProvider
A database selector always selecting the default database.- Returns:
- A provider for the default database name.
-