a2860f814931593c267a8af4b9b7568b9fbd66a3
[vtn.git] /
1 /*
2  * Copyright (c) 2015 NEC Corporation
3  * All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this
7  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.vtn.manager.internal.inventory;
11
12 import org.opendaylight.vtn.manager.internal.TxTask;
13
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
17
18 /**
19  * An event context used to handle node connector events.
20  */
21 interface NodeConnectorEventContext extends TxTask<Void> {
22     /**
23      * Add the given node to the node map to be updated.
24      *
25      * @param path   The identifier of the node connector to be added.
26      * @param nc     A {@link NodeConnector} instance to be added
27      * @param label  A label usd only for logging.
28      */
29     void addUpdated(InstanceIdentifier<NodeConnector> path, NodeConnector nc,
30                     String label);
31
32     /**
33      * Add the given node to the node map to be removed.
34      *
35      * @param path  The identifier of the node connector to be added.
36      * @param nc    A {@link NodeConnector} instance to be added.
37      */
38     void addRemoved(InstanceIdentifier<NodeConnector> path, NodeConnector nc);
39
40     /**
41      * Determine whether this instance contains at least one port information
42      * to be updated or removed.
43      *
44      * @return  {@code true} only if this instance contains at least one port
45      *          information to be updated or removed.
46      */
47     boolean hasPort();
48 }