2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.protocol.bgp.openconfig.spi;
11 import javax.annotation.Nonnull;
14 * The BGPOpenconfigMapper provides operations for adding/removing of BGP OpenConfig
15 * components mapped to BGP configuration modules
17 * @param <T> The type of a BGP module configuration holder to which the mapper is binded
19 public interface BGPOpenconfigMapper<T extends InstanceConfiguration> {
22 * Add a new or replace an exiting configuration. The write operation is done in
23 * non-blocking fashion.
24 * @param instanceConfiguration An input configuration is mapped to OpenConfig API
25 * @throws NullPointerException when the instanceConfiguration is null
27 void writeConfiguration(@Nonnull T instanceConfiguration);
30 * Remove an existing configuration identified by InstanceConfigurationIdentifier.
31 * @param instanceConfiguration an identifier of the configuration instance
32 * @throws NullPointerException when instanceConfiguration is null
34 void removeConfiguration(@Nonnull InstanceConfigurationIdentifier instanceConfiguration);