class StrategyZoneEnabledFilter extends AbstractStrategyEnabledFilter {
    @Value("${" + StrategyConstant.SPRING_APPLICATION_STRATEGY_ZONE_AFFINITY_ENABLED + ":false}")
    protected Boolean zoneAffinityEnabled;

    @Value("${" + StrategyConstant.SPRING_APPLICATION_STRATEGY_ZONE_FAILOVER_ENABLED + ":false}")
    protected Boolean zoneFailoverEnabled;

    @Override
    public boolean apply(List<? extends Server> servers, Server server) {<FILL_FUNCTION_BODY>}

    @Override
    public int getOrder() {
        return HIGHEST_PRECEDENCE + 4;
    }
}

        if (!zoneAffinityEnabled) {
            return true;
        }

        String zone = pluginAdapter.getZone();

        String serverZone = pluginAdapter.getServerZone(server);

        boolean found = findByZone(servers, zone);
        if (found) {
            // 可用区存在：执行可用区亲和性，即调用端实例和提供端实例的元数据Metadata的zone配置值相等才能调用
            return StringUtils.equals(serverZone, zone);
        } else {
            // 可用区不存在：路由开关打开，可路由到其它指定可用区；路由开关关闭，不可路由到其它可用区或者不归属任何可用区
            if (zoneFailoverEnabled) {
                String serviceId = pluginAdapter.getServerServiceId(server);

                String zoneFailovers = JsonUtil.fromJsonMap(pluginContextHolder.getContextRouteZoneFailover(), serviceId);
                if (StringUtils.isEmpty(zoneFailovers)) {
                    return true;
                } else {
                    return discoveryMatcher.match(zoneFailovers, serverZone, true);
                }
            }
        }

        return StringUtils.equals(serverZone, zone);
    
<methods>public non-sealed void <init>() ,public List<java.lang.String> assembleVersionList(List<? extends Server>) ,public void filter(List<? extends Server>) ,public boolean findByEnvironment(List<? extends Server>, java.lang.String) ,public boolean findByGroup(List<? extends Server>, java.lang.String) ,public boolean findByRegion(List<? extends Server>, java.lang.String) ,public boolean findByVersion(List<? extends Server>, java.lang.String) ,public boolean findByZone(List<? extends Server>, java.lang.String) ,public com.nepxion.discovery.plugin.strategy.matcher.DiscoveryMatcher getDiscoveryMatcher() ,public com.nepxion.discovery.plugin.framework.adapter.PluginAdapter getPluginAdapter() ,public com.nepxion.discovery.plugin.framework.context.PluginContextHolder getPluginContextHolder() ,public boolean matchByAddress(List<? extends Server>, java.lang.String) ,public boolean matchByRegion(List<? extends Server>, java.lang.String) ,public boolean matchByVersion(List<? extends Server>, java.lang.String) <variables>protected com.nepxion.discovery.plugin.strategy.matcher.DiscoveryMatcher discoveryMatcher,protected com.nepxion.discovery.plugin.framework.adapter.PluginAdapter pluginAdapter,protected com.nepxion.discovery.plugin.framework.context.PluginContextHolder pluginContextHolder,protected java.lang.String sortType