类 GroupCapacityPersistService
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.capacity.GroupCapacityPersistService
-
@Service public class GroupCapacityPersistService extends java.lang.ObjectGroup Capacity Service.- 作者:
- hexu.hxy
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 private static classGroupCapacityPersistService.GroupCapacityRowMapper
-
字段概要
字段 修饰符和类型 字段 说明 (专用程序包) static java.lang.StringCLUSTERprivate DataSourceServicedataSourceServiceprivate static GroupCapacityPersistService.GroupCapacityRowMapperGROUP_CAPACITY_ROW_MAPPERprivate org.springframework.jdbc.core.JdbcTemplatejdbcTemplate
-
构造器概要
构造器 构造器 说明 GroupCapacityPersistService()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancorrectUsage(java.lang.String group, java.sql.Timestamp gmtModified)Correct Usage.booleandecrementUsage(GroupCapacity groupCapacity)Decrement Usage.booleandeleteGroupCapacity(java.lang.String group)Delete GroupCapacity.java.util.List<GroupCapacity>getCapacityList4CorrectUsage(long lastId, int pageSize)Get group capacity list, noly has id and groupId value.CapacitygetClusterCapacity()intgetClusterUsage()GroupCapacitygetGroupCapacity(java.lang.String groupId)booleanincrementUsage(GroupCapacity groupCapacity)Increment Usage.booleanincrementUsageWithDefaultQuotaLimit(GroupCapacity groupCapacity)Increment UsageWithDefaultQuotaLimit.booleanincrementUsageWithQuotaLimit(GroupCapacity groupCapacity)Increment UsageWithQuotaLimit.voidinit()booleaninsertGroupCapacity(GroupCapacity capacity)Insert GroupCapacity into db.private booleaninsertGroupCapacity(java.lang.String sql, GroupCapacity capacity)booleanupdateGroupCapacity(java.lang.String group, java.lang.Integer quota, java.lang.Integer maxSize, java.lang.Integer maxAggrCount, java.lang.Integer maxAggrSize)Update GroupCapacity.booleanupdateMaxSize(java.lang.String group, java.lang.Integer maxSize)booleanupdateQuota(java.lang.String group, java.lang.Integer quota)
-
-
-
字段详细资料
-
CLUSTER
static final java.lang.String CLUSTER
- 另请参阅:
- 常量字段值
-
GROUP_CAPACITY_ROW_MAPPER
private static final GroupCapacityPersistService.GroupCapacityRowMapper GROUP_CAPACITY_ROW_MAPPER
-
jdbcTemplate
private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
-
dataSourceService
private DataSourceService dataSourceService
-
-
方法详细资料
-
init
@PostConstruct public void init()
-
getGroupCapacity
public GroupCapacity getGroupCapacity(java.lang.String groupId)
-
getClusterCapacity
public Capacity getClusterCapacity()
-
insertGroupCapacity
public boolean insertGroupCapacity(GroupCapacity capacity)
Insert GroupCapacity into db.- 参数:
capacity- capacity object instance.- 返回:
- operate result.
-
insertGroupCapacity
private boolean insertGroupCapacity(java.lang.String sql, GroupCapacity capacity)
-
getClusterUsage
public int getClusterUsage()
-
incrementUsageWithDefaultQuotaLimit
public boolean incrementUsageWithDefaultQuotaLimit(GroupCapacity groupCapacity)
Increment UsageWithDefaultQuotaLimit.- 参数:
groupCapacity- groupCapacity object instance.- 返回:
- operate result.
-
incrementUsageWithQuotaLimit
public boolean incrementUsageWithQuotaLimit(GroupCapacity groupCapacity)
Increment UsageWithQuotaLimit.- 参数:
groupCapacity- groupCapacity object instance.- 返回:
- operate result.
-
incrementUsage
public boolean incrementUsage(GroupCapacity groupCapacity)
Increment Usage.- 参数:
groupCapacity- groupCapacity object instance.- 返回:
- operate result.
-
decrementUsage
public boolean decrementUsage(GroupCapacity groupCapacity)
Decrement Usage.- 参数:
groupCapacity- groupCapacity object instance.- 返回:
- operate result.
-
updateGroupCapacity
public boolean updateGroupCapacity(java.lang.String group, java.lang.Integer quota, java.lang.Integer maxSize, java.lang.Integer maxAggrCount, java.lang.Integer maxAggrSize)Update GroupCapacity.- 参数:
group- group string value.quota- quota int value.maxSize- maxSize int value.maxAggrCount- maxAggrCount int value.maxAggrSize- maxAggrSize int value.- 返回:
-
updateQuota
public boolean updateQuota(java.lang.String group, java.lang.Integer quota)
-
updateMaxSize
public boolean updateMaxSize(java.lang.String group, java.lang.Integer maxSize)
-
correctUsage
public boolean correctUsage(java.lang.String group, java.sql.Timestamp gmtModified)Correct Usage.- 参数:
group- group string value.gmtModified- gmtModified.- 返回:
- operate result.
-
getCapacityList4CorrectUsage
public java.util.List<GroupCapacity> getCapacityList4CorrectUsage(long lastId, int pageSize)
Get group capacity list, noly has id and groupId value.- 参数:
lastId- lastId long value.pageSize- pageSize long value.- 返回:
- GroupCapacity list.
-
deleteGroupCapacity
public boolean deleteGroupCapacity(java.lang.String group)
Delete GroupCapacity.- 参数:
group- group string value.- 返回:
- operate result.
-
-