类 GroupCapacityPersistService


  • @Service
    public class GroupCapacityPersistService
    extends java.lang.Object
    Group Capacity Service.
    作者:
    hexu.hxy
    • 构造器详细资料

      • GroupCapacityPersistService

        public GroupCapacityPersistService()
    • 方法详细资料

      • 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.