类 TenantCapacityPersistService


  • @Service
    public class TenantCapacityPersistService
    extends java.lang.Object
    Tenant Capacity Service.
    作者:
    hexu.hxy
    • 字段详细资料

      • jdbcTemplate

        private org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
      • mapperManager

        private com.alibaba.nacos.plugin.datasource.MapperManager mapperManager
    • 构造器详细资料

      • TenantCapacityPersistService

        public TenantCapacityPersistService()
    • 方法详细资料

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