blob: 74eab4d60a4aeff7ca4748110d54841306a0ba4b [file] [log] [blame]
Andrea Campanellae3708782017-10-16 16:00:21 +02001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.net.meter;
18
19import com.google.common.annotations.Beta;
20import org.onosproject.net.driver.HandlerBehaviour;
21
22import java.util.Collection;
23import java.util.concurrent.CompletableFuture;
24
25/**
26 * Meter programmable device behaviour.
27 */
28@Beta
29public interface MeterProgrammable extends HandlerBehaviour {
30
31 /**
32 * Performs a meter operation on this device.
33 *
34 * @param meterOp operation to be performed
35 * @return Completable future with result of the operation
36 */
37 CompletableFuture<Boolean> performMeterOperation(MeterOperation meterOp);
38
39 /**
40 * Queries the meters from the device.
41 *
42 * @return completable future with the collection of meters
43 */
44 CompletableFuture<Collection<Meter>> getMeters();
Wailok Shumf013a782021-07-26 16:51:01 +080045
46 /**
47 * Queries the meter features from the device.
48 *
49 * @return completable future with the collection of meter features
50 */
51 CompletableFuture<Collection<MeterFeatures>> getMeterFeatures();
Frank Wangd7e3b4b2017-09-24 13:37:54 +090052}