Interface DataSrc
public interface DataSrc
Represents a data source corresponding to an external data resource, serving as a factory for
data connections or as a connection pool.
Implementations encapsulate connection management, pool configuration, and resource allocation
for specific data stores or external services (such as relational databases, HTTP clients, or
caching services). Data sources can be registered globally via Sabi.uses(String, DataSrc)
or bound locally to a DataHub.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this data source and disposes of any allocated resources or connection pools.Creates a newDataConninstance associated with this data source.voidsetup(AsyncGroup ag) Sets up this data source.
-
Method Details
-
setup
Sets up this data source.This method is invoked during application startup or hub setup to prepare connections or connection pools. Asynchronous setup background tasks can be registered using the provided
AsyncGroup.- Parameters:
ag- the asynchronous group for registering background tasks- Throws:
com.github.sttk.errs.Err- if setting up the data source fails
-
close
void close()Closes this data source and disposes of any allocated resources or connection pools. -
createDataConn
-