X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fstreams%2Flisteners%2FNotificator.java;h=166c473b9c77d118b14c822bc177a1320b77e0fe;hp=a576eed26978fb0380cd8a28613712409bf6ce53;hb=refs%2Fchanges%2F27%2F8927%2F3;hpb=cb210bea2ab44aa2922ed86232c9db9a10452fc0 diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/streams/listeners/Notificator.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/streams/listeners/Notificator.java index a576eed269..166c473b9c 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/streams/listeners/Notificator.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/streams/listeners/Notificator.java @@ -12,7 +12,6 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; - import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; /** @@ -34,7 +33,6 @@ public class Notificator { return listenersByStreamName.keySet(); } - /** * Gets {@link ListenerAdapter} specified by stream name. * @@ -47,8 +45,7 @@ public class Notificator { } /** - * Gets {@link ListenerAdapter} listener specified by - * {@link InstanceIdentifier} path. + * Gets {@link ListenerAdapter} listener specified by {@link InstanceIdentifier} path. * * @param path * Path to data in data repository. @@ -59,8 +56,7 @@ public class Notificator { } /** - * Checks if the listener specified by {@link InstanceIdentifier} path - * exist. + * Checks if the listener specified by {@link InstanceIdentifier} path exist. * * @param path * Path to data in data repository. @@ -71,18 +67,15 @@ public class Notificator { } /** - * Creates new {@link ListenerAdapter} listener from - * {@link InstanceIdentifier} path and stream name. + * Creates new {@link ListenerAdapter} listener from {@link InstanceIdentifier} path and stream name. * * @param path * Path to data in data repository. * @param streamName * The name of the stream. - * @return New {@link ListenerAdapter} listener from - * {@link InstanceIdentifier} path and stream name. + * @return New {@link ListenerAdapter} listener from {@link InstanceIdentifier} path and stream name. */ - public static ListenerAdapter createListener(InstanceIdentifier path, - String streamName) { + public static ListenerAdapter createListener(InstanceIdentifier path, String streamName) { ListenerAdapter listener = new ListenerAdapter(path, streamName); try { lock.lock(); @@ -95,8 +88,7 @@ public class Notificator { } /** - * Looks for listener determined by {@link InstanceIdentifier} path and - * removes it. + * Looks for listener determined by {@link InstanceIdentifier} path and removes it. * * @param path * InstanceIdentifier @@ -107,8 +99,7 @@ public class Notificator { } /** - * Creates String representation of stream name from URI. Removes slash from - * URI in start and end position. + * Creates String representation of stream name from URI. Removes slash from URI in start and end position. * * @param uri * URI for creation stream name. @@ -148,14 +139,12 @@ public class Notificator { } /** - * Checks if listener has at least one subscriber. In case it doesn't have any, delete - * listener. + * Checks if listener has at least one subscriber. In case it doesn't have any, delete listener. * * @param listener * ListenerAdapter */ - public static void removeListenerIfNoSubscriberExists( - ListenerAdapter listener) { + public static void removeListenerIfNoSubscriberExists(ListenerAdapter listener) { if (!listener.hasSubscribers()) { deleteListener(listener); }