java.lang.Object
net.foxgenesis.database.AConnectionProvider
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <U> CompletableFuture<U>asyncConnection(Function<Connection, U> function) voidclose()final StringgetName()protected <U> @NotNull Optional<U>openAutoClosedConnection(AConnectionProvider.ConnectionConsumer<U> consumer, Consumer<Throwable> error) protected abstract Connection
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
properties
-
-
Constructor Details
-
AConnectionProvider
-
-
Method Details
-
openConnection
- Throws:
SQLException
-
openAutoClosedConnection
@NotNull protected <U> @NotNull Optional<U> openAutoClosedConnection(AConnectionProvider.ConnectionConsumer<U> consumer, Consumer<Throwable> error) -
asyncConnection
-
getName
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-