Enum MultiTenancyMode
- java.lang.Object
-
- java.lang.Enum<MultiTenancyMode>
-
- io.micronaut.data.runtime.multitenancy.MultiTenancyMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MultiTenancyMode>
public enum MultiTenancyMode extends java.lang.Enum<MultiTenancyMode>
The multi-tenancy mode.- Since:
- 3.9.0
- Author:
- Denis Stepanov
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATASOURCE
A separate database with a separate connection pool is used to store each tenants data.DISCRIMINATOR
The same database is used with a discriminator used to partition and isolate data.SCHEMA
The same database, but different schemas are used to store each tenants data.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MultiTenancyMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MultiTenancyMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATASOURCE
public static final MultiTenancyMode DATASOURCE
A separate database with a separate connection pool is used to store each tenants data.
-
SCHEMA
public static final MultiTenancyMode SCHEMA
The same database, but different schemas are used to store each tenants data.
-
DISCRIMINATOR
public static final MultiTenancyMode DISCRIMINATOR
The same database is used with a discriminator used to partition and isolate data.
-
-
Method Detail
-
values
public static MultiTenancyMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MultiTenancyMode c : MultiTenancyMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MultiTenancyMode valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-