All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.csp.ahas.sentinel.acm.SentinelSdkInitServiceManager Maven / Gradle / Ivy

There is a newer version: 1.11.6-safe
Show newest version
package com.alibaba.csp.ahas.sentinel.acm;

import com.taobao.csp.ahas.service.api.client.ClientInfoService;
import com.taobao.csp.ahas.service.api.constant.AppConstants;
import com.taobao.csp.ahas.service.component.AgwComponentType;

/**
 * @Author: yunyin
 * @Date: 2020/8/24
 */
public class SentinelSdkInitServiceManager {
    public static final String type;
    static {
        type = System.getProperty(AppConstants.AHAS_AGW_COMPONENT_TYPE, String.valueOf(AgwComponentType.PUBLIC_CLOUD.getType()));
    }
    public static SentinelSdkInitService getInitService(ClientInfoService clientInfoService){
        SentinelSdkInitService service;
        if(String.valueOf(AgwComponentType.PRIVATE_CLOUD.getType()).equals(type)){
            service = new ApsaraSdkInitService(clientInfoService);
        }else{
            service = new DefaultSdkInitService(clientInfoService);
        }
        return service;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy