27aa17a9045e9f30c616152a65ada7e69d5397e0
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / FlowCapableContext.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.statistics.manager;
9
10 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionId;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15
16 import com.google.common.util.concurrent.ListenableFuture;
17
18 /**
19  * Interface exposed to AbstractStatsTracker by its parent NodeStatisticsHandler.
20  * While we could simply exist without this interface, its purpose is to document
21  * the contract between the two classes.
22  */
23 interface FlowCapableContext {
24     InstanceIdentifier<Node> getNodeIdentifier();
25     NodeRef getNodeRef();
26     DataModificationTransaction startDataModification();
27     void registerTransaction(ListenableFuture<TransactionId> future);
28     void registerTableTransaction(ListenableFuture<TransactionId> future, Short tableId);
29 }