// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/tenacity/TenacityPoller.java
// public class TenacityPoller extends TenacityCommand<Optional<Collection<String>>> {
//     public static class Factory {
//         private final TurbineTenacityClient tenacityClient;
// 
//         public Factory(TurbineTenacityClient tenacityClient) {
//             this.tenacityClient = tenacityClient;
//         }
// 
//         public TenacityPoller create(Instance instance) {
//             return new TenacityPoller(tenacityClient, instance);
//         }
//     }
// 
//     private final TurbineTenacityClient tenacityClient;
//     private final Instance instance;
// 
//     public TenacityPoller(TurbineTenacityClient tenacityClient,
//                           Instance instance) {
//         super(BreakerboxDependencyKey.BRKRBX_SERVICES_PROPERTYKEYS);
//         this.tenacityClient = tenacityClient;
//         this.instance = instance;
//     }
// 
//     @Override
//     protected Optional<Collection<String>> run() throws Exception {
//         return tenacityClient.getTenacityPropertyKeys(instance);
//     }
// 
//     @Override
//     protected Optional<Collection<String>> getFallback() {
//         return Optional.empty();
//     }
// }


import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.collect.ImmutableList;
import com.netflix.turbine.discovery.Instance;
import com.yammer.breakerbox.service.tenacity.TenacityPoller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
package com.yammer.breakerbox.service.store;



/**
 * TenacityPropertyKeysStore is a component used to track known keys for presentation in the Breakerbox
 * configuration front-end. Adding keys to any externally hosted data structures happens outside the
 * context of this class.
 */
public class TenacityPropertyKeysStore {
    private static final Logger LOGGER = LoggerFactory.getLogger(TenacityPropertyKeysStore.class);
    private final Cache<Instance, Collection<String>> tenacityPropertyKeyCache = CacheBuilder
            .newBuilder()
            .expireAfterWrite(1, TimeUnit.MINUTES)
            .build();
// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/tenacity/TenacityPoller.java
// public class TenacityPoller extends TenacityCommand<Optional<Collection<String>>> {
//     public static class Factory {
//         private final TurbineTenacityClient tenacityClient;
// 
//         public Factory(TurbineTenacityClient tenacityClient) {
//             this.tenacityClient = tenacityClient;
//         }
// 
//         public TenacityPoller create(Instance instance) {
//             return new TenacityPoller(tenacityClient, instance);
//         }
//     }
// 
//     private final TurbineTenacityClient tenacityClient;
//     private final Instance instance;
// 
//     public TenacityPoller(TurbineTenacityClient tenacityClient,
//                           Instance instance) {
//         super(BreakerboxDependencyKey.BRKRBX_SERVICES_PROPERTYKEYS);
//         this.tenacityClient = tenacityClient;
//         this.instance = instance;
//     }
// 
//     @Override
//     protected Optional<Collection<String>> run() throws Exception {
//         return tenacityClient.getTenacityPropertyKeys(instance);
//     }
// 
//     @Override
//     protected Optional<Collection<String>> getFallback() {
//         return Optional.empty();
//     }
// }


// Path: breakerbox-service/src/main/java/com/yammer/breakerbox/service/store/TenacityPropertyKeysStore.java
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.collect.ImmutableList;
import com.netflix.turbine.discovery.Instance;
import com.yammer.breakerbox.service.tenacity.TenacityPoller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

package com.yammer.breakerbox.service.store;



/**
 * TenacityPropertyKeysStore is a component used to track known keys for presentation in the Breakerbox
 * configuration front-end. Adding keys to any externally hosted data structures happens outside the
 * context of this class.
 */
public class TenacityPropertyKeysStore {
    private static final Logger LOGGER = LoggerFactory.getLogger(TenacityPropertyKeysStore.class);
    private final Cache<Instance, Collection<String>> tenacityPropertyKeyCache = CacheBuilder
            .newBuilder()
            .expireAfterWrite(1, TimeUnit.MINUTES)
            .build();
    private final TenacityPoller.Factory tenacityPollerFactory;