All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebean.config.TenantDataSourceProvider Maven / Gradle / Ivy

There is a newer version: 15.8.0
Show newest version
package io.ebean.config;

import javax.sql.DataSource;

/**
 * For multi-tenancy via DB supply the DataSource given the tenantId.
 */
@FunctionalInterface
public interface TenantDataSourceProvider {

  /**
   * Return the DataSource to use for the given current tenant.
   */
  DataSource dataSource(Object tenantId);

  /**
   * Shutdown all the DataSources.
   */
  default void shutdown(boolean deregisterDriver) {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy