类 TenantCapacityPersistService
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.capacity.TenantCapacityPersistService
-
@Service public class TenantCapacityPersistService extends java.lang.ObjectTenant Capacity Service.- 作者:
- hexu.hxy
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 private static classTenantCapacityPersistService.TenantCapacityRowMapper
-
字段概要
字段 修饰符和类型 字段 说明 private DataSourceServicedataSourceServiceprivate org.springframework.jdbc.core.JdbcTemplatejdbcTemplateprivate com.alibaba.nacos.plugin.datasource.MapperManagermapperManagerprivate static TenantCapacityPersistService.TenantCapacityRowMapperTENANT_CAPACITY_ROW_MAPPER
-
构造器概要
构造器 构造器 说明 TenantCapacityPersistService()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancorrectUsage(java.lang.String tenant, java.sql.Timestamp gmtModified)Correct Usage.booleandecrementUsage(TenantCapacity tenantCapacity)DecrementUsage.booleandeleteTenantCapacity(java.lang.String tenant)Delete TenantCapacity.java.util.List<TenantCapacity>getCapacityList4CorrectUsage(long lastId, int pageSize)Get TenantCapacity List, only including id and tenantId value.TenantCapacitygetTenantCapacity(java.lang.String tenantId)booleanincrementUsage(TenantCapacity tenantCapacity)Increment Usage.booleanincrementUsageWithDefaultQuotaLimit(TenantCapacity tenantCapacity)Increment UsageWithDefaultQuotaLimit.booleanincrementUsageWithQuotaLimit(TenantCapacity tenantCapacity)Increment UsageWithQuotaLimit.voidinit()init method.booleaninsertTenantCapacity(TenantCapacity tenantCapacity)Insert TenantCapacity.booleanupdateQuota(java.lang.String tenant, java.lang.Integer quota)booleanupdateTenantCapacity(java.lang.String tenant, java.lang.Integer quota, java.lang.Integer maxSize, java.lang.Integer maxAggrCount, java.lang.Integer maxAggrSize)Update TenantCapacity.
-
-
-
字段详细资料
-
TENANT_CAPACITY_ROW_MAPPER
private static final TenantCapacityPersistService.TenantCapacityRowMapper TENANT_CAPACITY_ROW_MAPPER
-
jdbcTemplate
private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
-
dataSourceService
private DataSourceService dataSourceService
-
mapperManager
private com.alibaba.nacos.plugin.datasource.MapperManager mapperManager
-
-
方法详细资料
-
init
@PostConstruct public void init()
init method.
-
getTenantCapacity
public TenantCapacity getTenantCapacity(java.lang.String tenantId)
-
insertTenantCapacity
public boolean insertTenantCapacity(TenantCapacity tenantCapacity)
Insert TenantCapacity.- 参数:
tenantCapacity- tenantCapacity object instance.- 返回:
- operate result.
-
incrementUsageWithDefaultQuotaLimit
public boolean incrementUsageWithDefaultQuotaLimit(TenantCapacity tenantCapacity)
Increment UsageWithDefaultQuotaLimit.- 参数:
tenantCapacity- tenantCapacity object instance.- 返回:
- operate result.
-
incrementUsageWithQuotaLimit
public boolean incrementUsageWithQuotaLimit(TenantCapacity tenantCapacity)
Increment UsageWithQuotaLimit.- 参数:
tenantCapacity- tenantCapacity object instance.- 返回:
- operate result.
-
incrementUsage
public boolean incrementUsage(TenantCapacity tenantCapacity)
Increment Usage.- 参数:
tenantCapacity- tenantCapacity object instance.- 返回:
- operate result.
-
decrementUsage
public boolean decrementUsage(TenantCapacity tenantCapacity)
DecrementUsage.- 参数:
tenantCapacity- tenantCapacity object instance.- 返回:
- operate result.
-
updateTenantCapacity
public boolean updateTenantCapacity(java.lang.String tenant, java.lang.Integer quota, java.lang.Integer maxSize, java.lang.Integer maxAggrCount, java.lang.Integer maxAggrSize)Update TenantCapacity.- 参数:
tenant- tenant string value.quota- quota int value.maxSize- maxSize int value.maxAggrCount- maxAggrCount int value.maxAggrSize- maxAggrSize int value.- 返回:
- operate result.
-
updateQuota
public boolean updateQuota(java.lang.String tenant, java.lang.Integer quota)
-
correctUsage
public boolean correctUsage(java.lang.String tenant, java.sql.Timestamp gmtModified)Correct Usage.- 参数:
tenant- tenant.gmtModified- gmtModified.- 返回:
- operate result.
-
getCapacityList4CorrectUsage
public java.util.List<TenantCapacity> getCapacityList4CorrectUsage(long lastId, int pageSize)
Get TenantCapacity List, only including id and tenantId value.- 参数:
lastId- lastId long value.pageSize- pageSize int value.- 返回:
- TenantCapacity List.
-
deleteTenantCapacity
public boolean deleteTenantCapacity(java.lang.String tenant)
Delete TenantCapacity.- 参数:
tenant- tenant string value.- 返回:
- operate result.
-
-