Package io.ebean.config
Enum TenantMode
- All Implemented Interfaces:
Serializable,Comparable<TenantMode>,java.lang.constant.Constable
public enum TenantMode extends Enum<TenantMode>
The mode to use for multi-tenancy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description CATALOGEach Tenant has their own Database but with in connection poolDBEach Tenant has their own Database (javax.sql.DataSource)DB_WITH_MASTEREach Tenant has their own Database (javax.sql.DataSource), and there is also one master-database (that holds configuration e.g.)NONENo multi-tenancy.PARTITIONTenants share tables but have a discriminator/partition column that partitions the data.SCHEMAEach Tenant has their own Database schema. -
Method Summary
Modifier and Type Method Description booleanisDdlEnabled()Returns true, if DDL is enabled.booleanisDynamicDataSource()Return true if the DataSource is not available on bootup.static TenantModevalueOf(String name)Returns the enum constant of this type with the specified name.static TenantMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
No multi-tenancy. -
DB
Each Tenant has their own Database (javax.sql.DataSource) -
SCHEMA
Each Tenant has their own Database schema. -
CATALOG
Each Tenant has their own Database but with in connection pool -
PARTITION
Tenants share tables but have a discriminator/partition column that partitions the data. -
DB_WITH_MASTER
Each Tenant has their own Database (javax.sql.DataSource), and there is also one master-database (that holds configuration e.g.)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isDynamicDataSource
Return true if the DataSource is not available on bootup. -
isDdlEnabled
Returns true, if DDL is enabled.
-