public final class Mystral extends Object
Database
and AsyncDatabase
objects.Modifier and Type | Method and Description |
---|---|
static @NotNull AsyncDatabase |
newAsyncDatabase(@NotNull Credentials credentials,
@NotNull Executor executor)
Creates a new AsyncDatabase with the given Credentials and an Executor implementation.
|
static <T extends DataSource> |
newAsyncDatabase(@NotNull DataSourceFactory<T> factory,
@NotNull Executor executor)
Creates a new AsyncDatabase with the given DataSourceFactory and an Executor implementation.
|
static @NotNull Database |
newDatabase(@NotNull Credentials credentials)
Creates a new Database with the given Credentials.
|
static <T extends DataSource> |
newDatabase(@NotNull DataSourceFactory<T> factory)
Creates a new Database with the given DataSourceFactory.
|
@NotNull public static @NotNull Database newDatabase(@NotNull @NotNull Credentials credentials) throws DataSourceInitException
credentials
- the Credentials for creating a connectionDataSourceInitException
- if something went wrongDatabase
,
Credentials
@NotNull public static <T extends DataSource> @NotNull Database newDatabase(@NotNull @NotNull DataSourceFactory<T> factory) throws DataSourceInitException
T
- the DataSource Typefactory
- the factoryDataSourceInitException
- if something went wrongDataSourceFactory
@NotNull public static @NotNull AsyncDatabase newAsyncDatabase(@NotNull @NotNull Credentials credentials, @NotNull @NotNull Executor executor) throws DataSourceInitException
credentials
- the credentials for creating a connectionexecutor
- the tasks executorDataSourceInitException
- if something went wrongAsyncDatabase
,
Executor
@NotNull public static <T extends DataSource> @NotNull AsyncDatabase newAsyncDatabase(@NotNull @NotNull DataSourceFactory<T> factory, @NotNull @NotNull Executor executor) throws DataSourceInitException
T
- the DataSource typefactory
- the factoryexecutor
- the tasks executorDataSourceInitException
- if something went wrongCopyright © 2021. All rights reserved.