@Test public void testCreateForBiDirectionCluster() throws Exception { RedisHealthCheckInstance instance = newRandomRedisHealthCheckInstance("currentDc", ClusterType.BI_DIRECTION, 6379); RedisMasterCheckAction action = (RedisMasterCheckAction) factory.create(instance); checkActionController(action, ClusterType.BI_DIRECTION); action.doTask(); }
@Override public SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance) { RedisMasterCheckAction action = new RedisMasterCheckAction(scheduled, instance, executors); ClusterType clusterType = instance.getRedisInstanceInfo().getClusterType(); action.addControllers(controllersByClusterType.get(clusterType)); action.addListeners(listenersByClusterType.get(clusterType)); return action; }
RedisMasterCheckActionFactory extends AbstractLeaderAwareHealthCheckActionFactory implements OneWaySupport, BiDirectionSupport { @Override public SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance) { RedisMasterCheckAction action = new RedisMasterCheckAction(scheduled, instance, executors); ClusterType clusterType = instance.getRedisInstanceInfo().getClusterType(); action.addControllers(controllersByClusterType.get(clusterType)); action.addListeners(listenersByClusterType.get(clusterType)); return action; } }
RedisMasterCheckActionFactory extends AbstractLeaderAwareHealthCheckActionFactory implements OneWaySupport, BiDirectionSupport { @Override public SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance) { RedisMasterCheckAction action = new RedisMasterCheckAction(scheduled, instance, executors); ClusterType clusterType = instance.getRedisInstanceInfo().getClusterType(); action.addControllers(controllersByClusterType.get(clusterType)); action.addListeners(listenersByClusterType.get(clusterType)); return action; } @Autowired  RedisMasterCheckActionFactory(List<RedisMasterController> controllers, List<RedisMasterActionListener> listeners); }
RedisMasterCheckActionFactory extends AbstractLeaderAwareHealthCheckActionFactory implements OneWaySupport, BiDirectionSupport { @Override public SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance) { RedisMasterCheckAction action = new RedisMasterCheckAction(scheduled, instance, executors); ClusterType clusterType = instance.getRedisInstanceInfo().getClusterType(); action.addControllers(controllersByClusterType.get(clusterType)); action.addListeners(listenersByClusterType.get(clusterType)); return action; } @Autowired  RedisMasterCheckActionFactory(List<RedisMasterController> controllers, List<RedisMasterActionListener> listeners); @Override SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance); @Override Class<? extends SiteLeaderAwareHealthCheckAction> support(); }
RedisMasterCheckActionFactory extends AbstractLeaderAwareHealthCheckActionFactory implements OneWaySupport, BiDirectionSupport { @Override public SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance) { RedisMasterCheckAction action = new RedisMasterCheckAction(scheduled, instance, executors); ClusterType clusterType = instance.getRedisInstanceInfo().getClusterType(); action.addControllers(controllersByClusterType.get(clusterType)); action.addListeners(listenersByClusterType.get(clusterType)); return action; } @Autowired  RedisMasterCheckActionFactory(List<RedisMasterController> controllers, List<RedisMasterActionListener> listeners); @Override SiteLeaderAwareHealthCheckAction create(RedisHealthCheckInstance instance); @Override Class<? extends SiteLeaderAwareHealthCheckAction> support();  }