@Test(expected = IllegalStateException.class) public void testEmptyShardMapProducer() throws Exception { final ShardedDOMDataTree dataTree = new ShardedDOMDataTree(); final DOMDataTreeProducer producer = dataTree.createProducer(Collections.singletonList(ROOT_ID)); producer.createTransaction(false); }
@GuardedBy("this") private DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees, final Map<DOMDataTreeIdentifier, DOMDataTreeShard> shardMap) { final DOMDataTreeProducer ret = ShardedDOMDataTreeProducer.create(this, subtrees, shardMap); for (final DOMDataTreeIdentifier subtree : subtrees) { producers.store(subtree, ret); producerMap.put(subtree, ret); } return ret; }
ShardedDOMDataTree implements DOMDataTreeService, DOMDataTreeShardingService { @GuardedBy("this") private DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees, final Map<DOMDataTreeIdentifier, DOMDataTreeShard> shardMap) { final DOMDataTreeProducer ret = ShardedDOMDataTreeProducer.create(this, subtrees, shardMap); for (final DOMDataTreeIdentifier subtree : subtrees) { producers.store(subtree, ret); producerMap.put(subtree, ret); } return ret; } }
ShardedDOMDataTree implements DOMDataTreeService, DOMDataTreeShardingService { @GuardedBy("this") private DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees, final Map<DOMDataTreeIdentifier, DOMDataTreeShard> shardMap) { final DOMDataTreeProducer ret = ShardedDOMDataTreeProducer.create(this, subtrees, shardMap); for (final DOMDataTreeIdentifier subtree : subtrees) { producers.store(subtree, ret); producerMap.put(subtree, ret); } return ret; }  }
ShardedDOMDataTree implements DOMDataTreeService, DOMDataTreeShardingService { @GuardedBy("this") private DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees, final Map<DOMDataTreeIdentifier, DOMDataTreeShard> shardMap) { final DOMDataTreeProducer ret = ShardedDOMDataTreeProducer.create(this, subtrees, shardMap); for (final DOMDataTreeIdentifier subtree : subtrees) { producers.store(subtree, ret); producerMap.put(subtree, ret); } return ret; }  @Override DOMDataTreeShardRegistration<T> registerDataTreeShard(
            final DOMDataTreeIdentifier prefix, final T shard, final DOMDataTreeProducer producer); @Override ClassToInstanceMap<DOMDataTreeServiceExtension> getExtensions(); @Override synchronized DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees); @SuppressWarnings({ "checkstyle:IllegalCatch", "checkstyle:hiddenField" }) @Override synchronized ListenerRegistration<T> registerListener(final T listener,
            final Collection<DOMDataTreeIdentifier> subtrees, final boolean allowRxMerges,
            final Collection<DOMDataTreeProducer> producers); }
ShardedDOMDataTree implements DOMDataTreeService, DOMDataTreeShardingService { @GuardedBy("this") private DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees, final Map<DOMDataTreeIdentifier, DOMDataTreeShard> shardMap) { final DOMDataTreeProducer ret = ShardedDOMDataTreeProducer.create(this, subtrees, shardMap); for (final DOMDataTreeIdentifier subtree : subtrees) { producers.store(subtree, ret); producerMap.put(subtree, ret); } return ret; }  @Override DOMDataTreeShardRegistration<T> registerDataTreeShard(
            final DOMDataTreeIdentifier prefix, final T shard, final DOMDataTreeProducer producer); @Override ClassToInstanceMap<DOMDataTreeServiceExtension> getExtensions(); @Override synchronized DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees); @SuppressWarnings({ "checkstyle:IllegalCatch", "checkstyle:hiddenField" }) @Override synchronized ListenerRegistration<T> registerListener(final T listener,
            final Collection<DOMDataTreeIdentifier> subtrees, final boolean allowRxMerges,
            final Collection<DOMDataTreeProducer> producers);  }