package com.ctrip.platform.dal.dao.datasource.cluster.strategy.multi;

import com.ctrip.platform.dal.dao.datasource.cluster.strategy.ConnectionFactoryAware;
import com.ctrip.platform.dal.dao.datasource.cluster.strategy.RouteStrategy;

/**
 * @Author limingdong
 * @create 2021/8/26
 */
public interface MultiMasterStrategy extends RouteStrategy, ConnectionFactoryAware {

    default boolean multiMaster() {
        return true;
    }

    String FAILOVER_TIME_MS = "failoverTimeMS";
    long DEFAULT_FAILOVER_TIME_MS_VALUE = 10000;

    String BLACKLIST_TIMEOUT_MS = "blacklistTimeoutMS";
    long DEFAULT_BLACKLIST_TIMEOUT_MS_VALUE = 10000;

    String FIXED_VALIDATE_PERIOD_MS = "fixedValidatePeriodMS";
    long DEFAULT_FIXED_VALIDATE_PERIOD_MS_VALUE = 30000;

    String ZONES_PRIORITY = "zonesPriority";
    String DEFAULT_ZONES_PRIORITY_VALUE = "shaoy,sharb,shajq,shafq";

    String MULTI_MASTER = "multiMaster";
    boolean DEFAULT_MULTI_MASTER_VALUE = true;

}

@@ -853,16 +853,22 @@
 %22sha
-o
+rb,shax
 y,sha
-rb
+fq
 ,sha
@@ -873,18 +873,18 @@
 hajq,sha
-fq
+oy
 %22;%0A%0A    

update default zonesPriority