Move queue/meter/flow listeners into their trackers
[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.md.statistics.manager.MultipartMessageManager.StatsRequestType;
11 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 import com.google.common.util.concurrent.ListenableFuture;
18
19 /**
20  * Interface exposed to AbstractStatsTracker by its parent NodeStatisticsHandler.
21  * While we could simply exist without this interface, its purpose is to document
22  * the contract between the two classes.
23  */
24 interface FlowCapableContext {
25     InstanceIdentifier<Node> getNodeIdentifier();
26     NodeRef getNodeRef();
27     DataModificationTransaction startDataModification();
28     void registerTransaction(ListenableFuture<TransactionId> future, StatsRequestType type);
29     void registerTableTransaction(ListenableFuture<TransactionId> future, Short tableId);
30 }