Enum Class Policy
- All Implemented Interfaces:
Serializable, Comparable<Policy>, Constable
审计日志分表策略枚举
定义审计日志表的分表策略,用于控制表名后缀的生成规则
分表策略说明: - MONTH:按月分表,表名后缀格式为yyyyMM(如:202401) - SEASON:按季度分表,表名后缀格式为yyyyQx(如:2024Q1) - YEAR:按年分表,表名后缀格式为yyyy(如:2024) - CUSTOMER:自定义策略,由用户自行实现表名后缀生成逻辑
使用场景: - 根据数据量和查询频率选择合适的分表策略 - 数据量大且查询频繁:建议使用MONTH或SEASON - 数据量小或查询不频繁:建议使用YEAR
- Author:
- Kerbores(kerbores@riemann.tech)
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
MONTH
按月分表表名后缀格式:yyyyMM(如:202401表示2024年1月)
-
SEASON
按季度分表表名后缀格式:yyyyQx(如:2024Q1表示2024年第一季度)
-
YEAR
按年分表表名后缀格式:yyyy(如:2024表示2024年)
-
CUSTOMER
自定义策略由用户自行实现TableSuffixProvider接口定义表名后缀生成逻辑
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-