Interface DataSrc
public interface DataSrc
Represents a data source corresponding to an external resource, serving as a factory for
DataConn instances or managing a connection pool.
Implementations encapsulate resource initialization, connection creation, and cleanup for
external systems such as relational databases, caches, or messaging services. Data sources can be
registered globally via Globals.uses(String, DataSrc) or locally via LogicRunner.uses(String, DataSrc).
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this data source and releases any resources or connection pools it manages.Creates a newDataConninstance backed by this data source.voidsetup(AsyncGroup ag) Sets up this data source before connections are created from it.
-
Method Details
-
setup
Sets up this data source before connections are created from it.Asynchronous setup tasks may be registered with the provided
AsyncGroup.- Parameters:
ag- the asynchronous group for registering background setup tasks- Throws:
com.github.sttk.errs.Err- if setting up this data source fails
-
close
void close()Closes this data source and releases any resources or connection pools it manages. -
createDataConn
-