X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-common-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fimpl%2Frouting%2FAbstractDataReadRouter.java;h=ee9af6cb80d91ccc4083a61e3e6a01604769a757;hb=48814d6a264b8f13e5db1422336d9ef25cb05fa9;hp=4ddceb3b5f015a709e508f73cbb91e4cc46e66e0;hpb=9d02282775e0464dd2b1e3e1c14bf02729f18ee9;p=controller.git diff --git a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/routing/AbstractDataReadRouter.java b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/routing/AbstractDataReadRouter.java index 4ddceb3b5f..ee9af6cb80 100644 --- a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/routing/AbstractDataReadRouter.java +++ b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/routing/AbstractDataReadRouter.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.md.sal.common.impl.routing; import java.util.Map.Entry; @@ -17,7 +24,7 @@ import com.google.common.collect.Multimaps; /** * Base abstract implementation of DataReadRouter, which performs * a read operation on multiple data readers and then merges result. - * + * * @param

* @param */ @@ -43,7 +50,7 @@ public abstract class AbstractDataReadRouter

, D> implements Da /** * Merges data readed by reader instances from specified path - * + * * @param path Path on which read was performed * @param data Data which was returned by read operation. * @return Merged result. @@ -52,11 +59,11 @@ public abstract class AbstractDataReadRouter

, D> implements Da /** * Returns a function which performs configuration read for supplied path - * + * * @param path * @return function which performs configuration read for supplied path */ - + private Function, D> configurationRead(final P path) { return new Function, D>() { @Override @@ -68,7 +75,7 @@ public abstract class AbstractDataReadRouter

, D> implements Da /** * Returns a function which performs operational read for supplied path - * + * * @param path * @return function which performs operational read for supplied path */ @@ -85,10 +92,10 @@ public abstract class AbstractDataReadRouter

, D> implements Da /** * Register's a reader for operational data. - * + * * @param path Path which is served by this reader * @param reader Reader instance which is responsible for reading particular subpath. - * @return + * @return */ public Registration> registerOperationalReader(P path, DataReader reader) { OperationalDataReaderRegistration ret = new OperationalDataReaderRegistration<>(path, reader); @@ -135,15 +142,15 @@ public abstract class AbstractDataReadRouter

, D> implements Da } private Predicate>> affects(final P path) { - + return new Predicate>>() { - + @Override public boolean apply(Entry> input) { final P key = input.getKey(); return key.contains(path) || ((P) path).contains(key); } - + }; }