From ec78a4861fe9c7b0f395e8f752afc69df1106f73 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 4 Feb 2014 02:10:10 +0100 Subject: [PATCH] Add a bit of documentation to extension contexts Change-Id: Iaadb9e7874c68fdd1d7225ca414d7daf720728a3 Signed-off-by: Robert Varga --- .../bgp/parser/spi/BGPExtensionConsumerContext.java | 5 +++++ .../bgp/parser/spi/BGPExtensionProviderContext.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerContext.java b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerContext.java index 08d2308835..e7367098b5 100644 --- a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerContext.java +++ b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerContext.java @@ -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(); diff --git a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionProviderContext.java b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionProviderContext.java index bd186afb6d..deac97f208 100644 --- a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionProviderContext.java +++ b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionProviderContext.java @@ -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 clazz, int number); AutoCloseable registerSubsequentAddressFamily(Class clazz, int number); -- 2.36.6