Class GroupCapacityPersistService
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.capacity.GroupCapacityPersistService
-
@Service public class GroupCapacityPersistService extends Object
Group Capacity Service- Author:
- hexu.hxy
-
-
Constructor Summary
Constructors Constructor Description GroupCapacityPersistService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancorrectUsage(String group, Timestamp gmtModified)booleandecrementUsage(GroupCapacity groupCapacity)booleandeleteGroupCapacity(String group)List<GroupCapacity>getCapacityList4CorrectUsage(long lastId, int pageSize)获取GroupCapacity列表,只有id、groupId有值CapacitygetClusterCapacity()intgetClusterUsage()GroupCapacitygetGroupCapacity(String groupId)booleanincrementUsage(GroupCapacity groupCapacity)booleanincrementUsageWithDefaultQuotaLimit(GroupCapacity groupCapacity)booleanincrementUsageWithQuotaLimit(GroupCapacity groupCapacity)voidinit()booleaninsertGroupCapacity(GroupCapacity capacity)booleanupdateGroupCapacity(String group, Integer quota, Integer maxSize, Integer maxAggrCount, Integer maxAggrSize)booleanupdateMaxSize(String group, Integer maxSize)booleanupdateQuota(String group, Integer quota)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
getGroupCapacity
public GroupCapacity getGroupCapacity(String groupId)
-
getClusterCapacity
public Capacity getClusterCapacity()
-
insertGroupCapacity
public boolean insertGroupCapacity(GroupCapacity capacity)
-
getClusterUsage
public int getClusterUsage()
-
incrementUsageWithDefaultQuotaLimit
public boolean incrementUsageWithDefaultQuotaLimit(GroupCapacity groupCapacity)
-
incrementUsageWithQuotaLimit
public boolean incrementUsageWithQuotaLimit(GroupCapacity groupCapacity)
-
incrementUsage
public boolean incrementUsage(GroupCapacity groupCapacity)
-
decrementUsage
public boolean decrementUsage(GroupCapacity groupCapacity)
-
updateGroupCapacity
public boolean updateGroupCapacity(String group, Integer quota, Integer maxSize, Integer maxAggrCount, Integer maxAggrSize)
-
getCapacityList4CorrectUsage
public List<GroupCapacity> getCapacityList4CorrectUsage(long lastId, int pageSize)
获取GroupCapacity列表,只有id、groupId有值- Parameters:
lastId- id > lastIdpageSize- 页数- Returns:
- GroupCapacity列表
-
deleteGroupCapacity
public boolean deleteGroupCapacity(String group)
-
-