+ Map<String, ShardStrategy> strategyMap = ImmutableMap.<String, ShardStrategy>builder().put(
+ "junk", new ShardStrategy() {
+ @Override
+ public String findShard(YangInstanceIdentifier path) {
+ return "junk";
+ }
+
+ @Override
+ public YangInstanceIdentifier getPrefixForPath(YangInstanceIdentifier path) {
+ return YangInstanceIdentifier.EMPTY;
+ }
+ }).put(
+ "cars", new ShardStrategy() {
+ @Override
+ public String findShard(YangInstanceIdentifier path) {
+ return "cars";
+ }
+
+ @Override
+ public YangInstanceIdentifier getPrefixForPath(YangInstanceIdentifier path) {
+ return YangInstanceIdentifier.EMPTY;
+ }
+ }).build();
+