Add a bit of documentation to extension contexts 16/5116/1
authorRobert Varga <rovarga@cisco.com>
Tue, 4 Feb 2014 01:10:10 +0000 (02:10 +0100)
committerRobert Varga <rovarga@cisco.com>
Tue, 4 Feb 2014 13:17:22 +0000 (14:17 +0100)
Change-Id: Iaadb9e7874c68fdd1d7225ca414d7daf720728a3
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerContext.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionProviderContext.java

index 08d23088352d3e8abaedd91f1b3e37d3a5365161..e7367098b5d03df5548143c828db94e3c79d9688 100644 (file)
@@ -7,6 +7,11 @@
  */
 package org.opendaylight.protocol.bgp.parser.spi;
 
+/**
+ * A single instance of a collection of extensions for use by consumers. This
+ * provides access to the various BGP-related registries. The registries are
+ * read-only and are populated by extension producers.
+ */
 public interface BGPExtensionConsumerContext {
        AddressFamilyRegistry getAddressFamilyRegistry();
        AttributeRegistry getAttributeRegistry();
index bd186afb6d5fb9cc0e23899aa8b2a3dbf0ded9da..deac97f208631db76650819096d3a71e94ee76d8 100644 (file)
@@ -14,6 +14,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.type
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
+/**
+ * Context for registering providers of the various types of extension points BGP provides.
+ * These are then consumed by extension consumers. It also provides access to the context-wide
+ * object cache, which extension providers can use to increase the in-memory efficiency
+ * when the same objects are created over and over again.
+ */
 public interface BGPExtensionProviderContext extends BGPExtensionConsumerContext {
        AutoCloseable registerAddressFamily(Class<? extends AddressFamily> clazz, int number);
        AutoCloseable registerSubsequentAddressFamily(Class<? extends SubsequentAddressFamily> clazz, int number);