Search in sources :

Example 6 with PradarSwitchEvent

use of com.pamirs.pradar.event.PradarSwitchEvent in project LinkAgent by shulieTech.

the class PradarSwitcher method clusterTestReady.

/**
 * 设置压测环境已经准备完成
 */
public static void clusterTestReady() {
    boolean before = isClusterTestEnabled();
    isClusterTestReady = true;
    configSwitchers.clear();
    boolean after = isClusterTestEnabled();
    if (before != after) {
        for (PradarSwitcherListener listener : listeners) {
            listener.onListen(new PradarSwitchEvent(after, getClusterTestUnableReason()));
        }
    }
}
Also used : PradarSwitchEvent(com.pamirs.pradar.event.PradarSwitchEvent)

Aggregations

PradarSwitchEvent (com.pamirs.pradar.event.PradarSwitchEvent)6 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 ErrorEvent (com.pamirs.pradar.event.ErrorEvent)1 Event (com.pamirs.pradar.event.Event)1 PradarException (com.pamirs.pradar.exception.PradarException)1 ZkClientSpec (com.shulie.instrument.module.register.zk.impl.ZkClientSpec)1