Merge "Implementation of ModuleShardStrategy"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / utils / MockConfiguration.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore.utils;
10
11 import com.google.common.base.Optional;
12 import org.opendaylight.controller.cluster.datastore.Configuration;
13 import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
14
15 import java.util.ArrayList;
16 import java.util.Collections;
17 import java.util.List;
18 import java.util.Map;
19
20 public class MockConfiguration implements Configuration{
21     @Override public List<String> getMemberShardNames(String memberName) {
22         List<String> shardNames = new ArrayList<>();
23         shardNames.add("default");
24         return shardNames;
25     }
26
27     @Override public Optional<String> getModuleNameFromNameSpace(
28         String nameSpace) {
29         return Optional.absent();
30     }
31
32     @Override
33     public Map<String, ShardStrategy> getModuleNameToShardStrategyMap() {
34         return Collections.EMPTY_MAP;
35     }
36
37     @Override public List<String> getShardNamesFromModuleName(
38         String moduleName) {
39         return Collections.EMPTY_LIST;
40     }
41 }