// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/core/Instances.java
// public class Instances {
//     private static final Logger LOGGER = LoggerFactory.getLogger(Instances.class);
// 
//     public static Collection<Instance> instances() {
//         try {
//             return PluginsFactory.getInstanceDiscovery().getInstanceList();
//         } catch (Exception err) {
//             LOGGER.warn("Could not fetch clusters dynamically", err);
//         }
// 
//         return ImmutableList.of();
//     }
// 
//     public static Collection<String> clusters() {
//         return instances()
//                 .stream()
//                 .map(Instance::getCluster)
//                 .sorted()
//                 .collect(Collectors.toCollection(TreeSet::new));
//     }
// 
//     public static Collection<String> noMetaClusters(Set<String> specifiedMetaClusters) {
//         return instances()
//                 .stream()
//                 .filter((instance) -> !specifiedMetaClusters.contains(instance.getCluster().toUpperCase()))
//                 .map(Instance::getCluster)
//                 .sorted()
//                 .collect(Collectors.toCollection(TreeSet::new));
//     }
// 
//     public static Collection<Instance> instances(ServiceId serviceId) {
//         return instances()
//                 .stream()
//                 .filter((instance) -> instance.getCluster().equals(serviceId.getId()))
//                 .sorted()
//                 .collect(Collectors.toList());
//     }
// 
//     public static String toInstanceId(Instance instance) {
//         return instance.getAttributes().get(TurbineInstanceDiscovery.BREAKERBOX_INSTANCE_ID);
//     }
// }


import com.yammer.breakerbox.service.core.Instances;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package com.yammer.breakerbox.service.store;


public class ScheduledTenacityPoller implements Runnable {
    private final TenacityPropertyKeysStore tenacityPropertyKeysStore;
    private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledTenacityPoller.class);

    public ScheduledTenacityPoller(TenacityPropertyKeysStore tenacityPropertyKeysStore) {
        this.tenacityPropertyKeysStore = tenacityPropertyKeysStore;
    }

    @Override
    public void run() {
        try {
// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/core/Instances.java
// public class Instances {
//     private static final Logger LOGGER = LoggerFactory.getLogger(Instances.class);
// 
//     public static Collection<Instance> instances() {
//         try {
//             return PluginsFactory.getInstanceDiscovery().getInstanceList();
//         } catch (Exception err) {
//             LOGGER.warn("Could not fetch clusters dynamically", err);
//         }
// 
//         return ImmutableList.of();
//     }
// 
//     public static Collection<String> clusters() {
//         return instances()
//                 .stream()
//                 .map(Instance::getCluster)
//                 .sorted()
//                 .collect(Collectors.toCollection(TreeSet::new));
//     }
// 
//     public static Collection<String> noMetaClusters(Set<String> specifiedMetaClusters) {
//         return instances()
//                 .stream()
//                 .filter((instance) -> !specifiedMetaClusters.contains(instance.getCluster().toUpperCase()))
//                 .map(Instance::getCluster)
//                 .sorted()
//                 .collect(Collectors.toCollection(TreeSet::new));
//     }
// 
//     public static Collection<Instance> instances(ServiceId serviceId) {
//         return instances()
//                 .stream()
//                 .filter((instance) -> instance.getCluster().equals(serviceId.getId()))
//                 .sorted()
//                 .collect(Collectors.toList());
//     }
// 
//     public static String toInstanceId(Instance instance) {
//         return instance.getAttributes().get(TurbineInstanceDiscovery.BREAKERBOX_INSTANCE_ID);
//     }
// }


// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/store/ScheduledTenacityPoller.java
import com.yammer.breakerbox.service.core.Instances;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package com.yammer.breakerbox.service.store;


public class ScheduledTenacityPoller implements Runnable {
    private final TenacityPropertyKeysStore tenacityPropertyKeysStore;
    private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledTenacityPoller.class);

    public ScheduledTenacityPoller(TenacityPropertyKeysStore tenacityPropertyKeysStore) {
        this.tenacityPropertyKeysStore = tenacityPropertyKeysStore;
    }

    @Override
    public void run() {
        try {
            Instances.instances().forEach(tenacityPropertyKeysStore::getTenacityPropertyKeys);