import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementation;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementation;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
private final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls;
private final SchemaPath schemaPath;
private final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls;
private final SchemaPath schemaPath;
- protected AbstractDOMRpcRoutingTableEntry(final SchemaPath schemaPath, final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
+ AbstractDOMRpcRoutingTableEntry(final SchemaPath schemaPath,
+ final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
this.schemaPath = Preconditions.checkNotNull(schemaPath);
this.impls = Preconditions.checkNotNull(impls);
}
this.schemaPath = Preconditions.checkNotNull(schemaPath);
this.impls = Preconditions.checkNotNull(impls);
}
- final AbstractDOMRpcRoutingTableEntry add(final DOMRpcImplementation implementation, final List<YangInstanceIdentifier> newRpcs) {
+ final AbstractDOMRpcRoutingTableEntry add(final DOMRpcImplementation implementation,
+ final List<YangInstanceIdentifier> newRpcs) {
final Builder<YangInstanceIdentifier, List<DOMRpcImplementation>> vb = ImmutableMap.builder();
for (final Entry<YangInstanceIdentifier, List<DOMRpcImplementation>> ve : impls.entrySet()) {
if (newRpcs.remove(ve.getKey())) {
final Builder<YangInstanceIdentifier, List<DOMRpcImplementation>> vb = ImmutableMap.builder();
for (final Entry<YangInstanceIdentifier, List<DOMRpcImplementation>> ve : impls.entrySet()) {
if (newRpcs.remove(ve.getKey())) {
- final AbstractDOMRpcRoutingTableEntry remove(final DOMRpcImplementation implementation, final List<YangInstanceIdentifier> removed) {
+ final AbstractDOMRpcRoutingTableEntry remove(final DOMRpcImplementation implementation,
+ final List<YangInstanceIdentifier> removed) {
final Builder<YangInstanceIdentifier, List<DOMRpcImplementation>> vb = ImmutableMap.builder();
for (final Entry<YangInstanceIdentifier, List<DOMRpcImplementation>> ve : impls.entrySet()) {
if (removed.remove(ve.getKey())) {
final Builder<YangInstanceIdentifier, List<DOMRpcImplementation>> vb = ImmutableMap.builder();
for (final Entry<YangInstanceIdentifier, List<DOMRpcImplementation>> ve : impls.entrySet()) {
if (removed.remove(ve.getKey())) {
i.remove(implementation);
// We could trimToSize(), but that may perform another copy just to get rid
// of a single element. That is probably not worth the trouble.
i.remove(implementation);
// We could trimToSize(), but that may perform another copy just to get rid
// of a single element. That is probably not worth the trouble.