class StrategyWeightRandomLoadBalanceAdapter extends AbstractWeightRandomLoadBalanceAdapter<WeightFilterEntity> {
    public StrategyWeightRandomLoadBalanceAdapter(PluginAdapter pluginAdapter, PluginContextHolder pluginContextHolder) {
        super(pluginAdapter, pluginContextHolder);
    }

    @Override
    public WeightFilterEntity getT() {<FILL_FUNCTION_BODY>}

    @Override
    public int getWeight(Server server, WeightFilterEntity weightFilterEntity) {
        String providerServiceId = pluginAdapter.getServerServiceId(server);
        String providerVersion = pluginAdapter.getServerVersion(server);
        String providerRegion = pluginAdapter.getServerRegion(server);

        return WeightEntityWrapper.getWeight(weightFilterEntity, providerServiceId, providerVersion, providerRegion, null);
    }
}

        if (pluginContextHolder == null) {
            return null;
        }

        WeightFilterEntity weightFilterEntity = new WeightFilterEntity();

        String versionWeightValue = pluginContextHolder.getContextRouteVersionWeight();
        if (StringUtils.isNotEmpty(versionWeightValue)) {
            try {
                List<WeightEntity> weightEntityList = WeightEntityWrapper.parseWeightEntityList(versionWeightValue);
                weightFilterEntity.setVersionWeightEntityList(weightEntityList);
            } catch (Exception e) {
                VersionWeightEntity weightEntity = new VersionWeightEntity();

                WeightEntityWrapper.parseWeightEntity(weightEntity, versionWeightValue);

                weightFilterEntity.setVersionWeightEntity(weightEntity);
            }
        }

        String regionWeightValue = pluginContextHolder.getContextRouteRegionWeight();
        if (StringUtils.isNotEmpty(regionWeightValue)) {
            try {
                List<WeightEntity> weightEntityList = WeightEntityWrapper.parseWeightEntityList(regionWeightValue);
                weightFilterEntity.setRegionWeightEntityList(weightEntityList);
            } catch (Exception e) {
                RegionWeightEntity weightEntity = new RegionWeightEntity();

                WeightEntityWrapper.parseWeightEntity(weightEntity, regionWeightValue);

                weightFilterEntity.setRegionWeightEntity(weightEntity);
            }
        }

        return weightFilterEntity;
    
<methods>public void <init>(com.nepxion.discovery.plugin.framework.adapter.PluginAdapter) ,public void <init>(com.nepxion.discovery.plugin.framework.adapter.PluginAdapter, com.nepxion.discovery.plugin.framework.context.PluginContextHolder) ,public boolean checkWeight(List<Server>, com.nepxion.discovery.common.entity.WeightFilterEntity) ,public abstract com.nepxion.discovery.common.entity.WeightFilterEntity getT() ,public abstract int getWeight(Server, com.nepxion.discovery.common.entity.WeightFilterEntity) <variables>protected com.nepxion.discovery.plugin.framework.adapter.PluginAdapter pluginAdapter,protected com.nepxion.discovery.plugin.framework.context.PluginContextHolder pluginContextHolder