// Path: src/main/java/com/flipkart/ranger/finder/sharded/SimpleShardedServiceFinderBuilder.java
// public class SimpleShardedServiceFinderBuilder<T> extends BaseServiceFinderBuilder<T, MapBasedServiceRegistry<T>, SimpleShardedServiceFinder<T>> {
//     @Override
//     protected SimpleShardedServiceFinder<T> buildFinder(
//             Service service,
//             Deserializer<T> deserializer,
//             ShardSelector<T, MapBasedServiceRegistry<T>> shardSelector,
//             ServiceNodeSelector<T> nodeSelector,
//             int nodeRefreshIntervalMs,
//             boolean disableWatchers) {
//         if (null == shardSelector) {
//             shardSelector = new MatchingShardSelector<>();
//         }
//         MapBasedServiceRegistry<T> serviceRegistry
//                 = new MapBasedServiceRegistry<>(service, deserializer, nodeRefreshIntervalMs, disableWatchers);
//         return new SimpleShardedServiceFinder<>(serviceRegistry, shardSelector, nodeSelector);
//     }
// }
// 
// Path: src/main/java/com/flipkart/ranger/finder/unsharded/UnshardedFinderBuilder.java
// public class UnshardedFinderBuilder extends BaseServiceFinderBuilder<UnshardedClusterInfo, UnshardedClusterServiceRegistry, UnshardedClusterFinder> {
//     @Override
//     protected UnshardedClusterFinder buildFinder(Service service,
//                                                  Deserializer<UnshardedClusterInfo> deserializer,
//                                                  ShardSelector<UnshardedClusterInfo,
//                                                  UnshardedClusterServiceRegistry> shardSelector,
//                                                  ServiceNodeSelector<UnshardedClusterInfo> nodeSelector,
//                                                  int nodeRefreshIntervalMs,
//                                                  boolean disableWatchers) {
//         UnshardedClusterServiceRegistry unshardedClusterServiceRegistry
//                 = new UnshardedClusterServiceRegistry(service, deserializer, nodeRefreshIntervalMs, disableWatchers);
//         return new UnshardedClusterFinder(unshardedClusterServiceRegistry, new NoOpShardSelector(), nodeSelector);
//     }
// }


import com.flipkart.ranger.finder.sharded.SimpleShardedServiceFinderBuilder;
import com.flipkart.ranger.finder.unsharded.UnshardedFinderBuilder;
/**
 * Copyright 2015 Flipkart Internet Pvt. Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.flipkart.ranger;


public class ServiceFinderBuilders {
    
    private ServiceFinderBuilders() {
        throw new InstantiationError("Must not instantiate this class");
    }
    
    public static <T> SimpleShardedServiceFinderBuilder<T> shardedFinderBuilder() {
// Path: src/main/java/com/flipkart/ranger/finder/sharded/SimpleShardedServiceFinderBuilder.java
// public class SimpleShardedServiceFinderBuilder<T> extends BaseServiceFinderBuilder<T, MapBasedServiceRegistry<T>, SimpleShardedServiceFinder<T>> {
//     @Override
//     protected SimpleShardedServiceFinder<T> buildFinder(
//             Service service,
//             Deserializer<T> deserializer,
//             ShardSelector<T, MapBasedServiceRegistry<T>> shardSelector,
//             ServiceNodeSelector<T> nodeSelector,
//             int nodeRefreshIntervalMs,
//             boolean disableWatchers) {
//         if (null == shardSelector) {
//             shardSelector = new MatchingShardSelector<>();
//         }
//         MapBasedServiceRegistry<T> serviceRegistry
//                 = new MapBasedServiceRegistry<>(service, deserializer, nodeRefreshIntervalMs, disableWatchers);
//         return new SimpleShardedServiceFinder<>(serviceRegistry, shardSelector, nodeSelector);
//     }
// }
// 
// Path: src/main/java/com/flipkart/ranger/finder/unsharded/UnshardedFinderBuilder.java
// public class UnshardedFinderBuilder extends BaseServiceFinderBuilder<UnshardedClusterInfo, UnshardedClusterServiceRegistry, UnshardedClusterFinder> {
//     @Override
//     protected UnshardedClusterFinder buildFinder(Service service,
//                                                  Deserializer<UnshardedClusterInfo> deserializer,
//                                                  ShardSelector<UnshardedClusterInfo,
//                                                  UnshardedClusterServiceRegistry> shardSelector,
//                                                  ServiceNodeSelector<UnshardedClusterInfo> nodeSelector,
//                                                  int nodeRefreshIntervalMs,
//                                                  boolean disableWatchers) {
//         UnshardedClusterServiceRegistry unshardedClusterServiceRegistry
//                 = new UnshardedClusterServiceRegistry(service, deserializer, nodeRefreshIntervalMs, disableWatchers);
//         return new UnshardedClusterFinder(unshardedClusterServiceRegistry, new NoOpShardSelector(), nodeSelector);
//     }
// }


// Path: src/main/java/com/flipkart/ranger/ServiceFinderBuilders.java
import com.flipkart.ranger.finder.sharded.SimpleShardedServiceFinderBuilder;
import com.flipkart.ranger.finder.unsharded.UnshardedFinderBuilder;

/**
 * Copyright 2015 Flipkart Internet Pvt. Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.flipkart.ranger;


public class ServiceFinderBuilders {
    
    private ServiceFinderBuilders() {
        throw new InstantiationError("Must not instantiate this class");
    }
    
    public static <T> SimpleShardedServiceFinderBuilder<T> shardedFinderBuilder() {
        return new SimpleShardedServiceFinderBuilder<>();