blob: 42148f653d59a714e4e822c383903c0110bb99bb [file] [log] [blame]
Jian Li69600e02018-12-24 13:21:18 +09001/*
2 * Copyright 2018-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 */
16package org.onosproject.openstacktelemetry.api;
17
18import org.onosproject.openstacktelemetry.api.config.TelemetryConfig;
19import org.onosproject.openstacktelemetry.api.config.TelemetryConfig.ConfigType;
20import org.onosproject.store.Store;
21
22import java.util.Set;
23
24/**
25 * Manages inventory of telemetry config; not intended for direct use.
26 */
27public interface TelemetryConfigStore
28 extends Store<TelemetryConfigEvent, TelemetryConfigStoreDelegate> {
29
30 /**
31 * Creates a new telemetry config.
32 *
33 * @param config a telemetry config
34 */
35 void createTelemetryConfig(TelemetryConfig config);
36
37 /**
38 * Updates the existing telemetry config.
39 *
40 * @param config the existing telemetry config
41 */
42 void updateTelemetryConfig(TelemetryConfig config);
43
44 /**
45 * Removes the existing telemetry config.
46 *
47 * @param name telemetry config name
48 * @return the removed telemetry config
49 */
50 TelemetryConfig removeTelemetryConfig(String name);
51
52 /**
53 * Obtains the existing telemetry config.
54 *
55 * @param name telemetry config name
56 * @return queried telemetry config
57 */
58 TelemetryConfig telemetryConfig(String name);
59
60 /**
61 * Obtains a collection of all of telemetry configs.
62 *
63 * @return a collection of all of telemetry configs
64 */
65 Set<TelemetryConfig> telemetryConfigs();
66
67 /**
68 * Obtains a collection of telemetry configs by config type.
69 *
70 * @param type config type
71 * @return a collection of telemetry configs by config type
72 */
73 Set<TelemetryConfig> telemetryConfigsByType(ConfigType type);
74
75 /**
76 * Removes all telemetry configs.
77 */
78 void clear();
79}