Class SequenceDataSource
java.lang.Object
io.ebeaninternal.server.transaction.SequenceDataSource
- All Implemented Interfaces:
io.ebean.config.dbplatform.TenantConnectionSource, Wrapper, CommonDataSource, DataSource
public final class SequenceDataSource
extends Object
implements DataSource, io.ebean.config.dbplatform.TenantConnectionSource
DataSource used for sequence id generation that is multi-tenant aware.
Delegates to the current tenant DataSource via the DataSourceSupplier and
additionally implements TenantConnectionSource so the sequence generator can
maintain a separate id buffer per tenant and obtain connections routed to a specific
tenant (needed for background pre-fetch where the current tenant is not in scope).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnectionForTenant(Object tenantId) getConnection(String username, String password) intbooleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <T> TMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommonDataSource
createShardingKeyBuilderMethods inherited from interface DataSource
createConnectionBuilder
-
Constructor Details
-
SequenceDataSource
-
-
Method Details
-
currentTenantId
- Specified by:
currentTenantIdin interfaceio.ebean.config.dbplatform.TenantConnectionSource
-
connectionForTenant
- Specified by:
connectionForTenantin interfaceio.ebean.config.dbplatform.TenantConnectionSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-