+ Map<String, ShardStrategy> strategyMap = ImmutableMap.<String, ShardStrategy>builder().put(
+ TestModel.JUNK_QNAME.getLocalName(), new ShardStrategy() {
+ @Override
+ public String findShard(final YangInstanceIdentifier path) {
+ return TestModel.JUNK_QNAME.getLocalName();
+ }
+
+ @Override
+ public YangInstanceIdentifier getPrefixForPath(final YangInstanceIdentifier path) {
+ return YangInstanceIdentifier.empty();
+ }
+ }).put(
+ CarsModel.BASE_QNAME.getLocalName(), new ShardStrategy() {
+ @Override
+ public String findShard(final YangInstanceIdentifier path) {
+ return CarsModel.BASE_QNAME.getLocalName();
+ }
+
+ @Override
+ public YangInstanceIdentifier getPrefixForPath(final YangInstanceIdentifier path) {
+ return YangInstanceIdentifier.empty();
+ }
+ }).build();
+