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.openflowplugin.api.openflow.statistics;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import io.netty.util.Timeout;
13 import org.opendaylight.openflowplugin.api.openflow.OFPContext;
14 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
15 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
16 import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleListener;
18 import java.util.Optional;
21 * Context for statistics
23 public interface StatisticsContext extends RequestContextStack, AutoCloseable, OFPContext {
25 ListenableFuture<Boolean> gatherDynamicData();
28 * Method has to be called from DeviceInitialization Method, otherwise
29 * we are not able to poll anything. Statistics Context normally initialize
30 * this part by initialization process but we don't have this information
31 * in initialization phase and we have to populate whole list after every
32 * device future collecting. Because device future collecting set DeviceState
33 * and we creating marks for the correct kind of stats from DeviceState.
35 void statListForCollectingInitialization();
38 * @param pollTimeout handle to nearest scheduled statistics poll
40 void setPollTimeout(Timeout pollTimeout);
43 * @return handle to currently scheduled statistics polling
45 Optional<Timeout> getPollTimeout();
48 * @return dedicated item life cycle change listener (per device)
50 ItemLifecycleListener getItemLifeCycleListener();
55 void setSchedulingEnabled(boolean schedulingEnabled);
56 boolean isSchedulingEnabled();