blob: de8a36f17b7037d7a92aaf5f1d7ec13539f7127e [file] [log] [blame]
Jian Liff8b9f92018-06-05 17:36:37 +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.config;
17
18import java.util.Map;
19
20/**
21 * Configuration API of InfluxDB for publishing openstack telemetry.
22 */
Jian Li52c11222018-06-07 11:39:17 +090023public interface InfluxDbTelemetryConfig extends TelemetryConfig {
Jian Liff8b9f92018-06-05 17:36:37 +090024
25 /**
26 * Obtains InfluxDB server IP address.
27 *
28 * @return InfluxDB server IP address
29 */
30 String address();
31
32 /**
33 * Obtains InfluxDB server port number.
34 *
35 * @return InfluxDB server port number
36 */
37 int port();
38
39 /**
40 * Obtains InfluxDB username for accessing.
41 *
42 * @return InfluxDB username
43 */
44 String username();
45
46 /**
47 * Obtains InfluxDB password for accessing.
48 *
49 * @return InfluxDB password
50 */
51 String password();
52
53 /**
54 * Obtains InfluxDB database name.
55 *
56 * @return InfluxDB database name
57 */
58 String database();
59
60 /**
61 * Obtains InfluxDB enable batch flag.
62 *
63 * @return InfluxDB enable batch flag
64 */
65 boolean enableBatch();
66
67 /**
68 * Obtains InfluxDB config maps.
69 *
70 * @return InfluxDB config map
71 */
72 Map<String, Object> configMap();
73
74 /**
75 * Builder class of InfluxDbTelemetryConfig.
76 */
Jian Li52c11222018-06-07 11:39:17 +090077 interface Builder extends TelemetryConfig.Builder {
Jian Liff8b9f92018-06-05 17:36:37 +090078
79 /**
80 * Sets InfluxDB server IP address.
81 *
82 * @param address InfluxDB server IP address
83 * @return builder instances
84 */
85 Builder withAddress(String address);
86
87 /**
88 * Sets InfluxDB server port number.
89 *
90 * @param port InfluxDB server port number
91 * @return builder instance
92 */
93 Builder withPort(int port);
94
95 /**
96 * Sets InfluxDB username.
97 *
98 * @param username InfluxDB username
99 * @return builder instance
100 */
101 Builder withUsername(String username);
102
103 /**
104 * Sets InfluxDB password.
105 *
106 * @param password InfluxDB password
107 * @return builder instance
108 */
109 Builder withPassword(String password);
110
111 /**
112 * Sets InfluxDB database.
113 *
114 * @param database InfluxDB database
115 * @return builder instance
116 */
117 Builder withDatabase(String database);
118
119 /**
120 * Sets InfluxDB enable batch flag.
121 *
122 * @param enableBatch enable batch flag
123 * @return builder instance
124 */
125 Builder withEnableBatch(boolean enableBatch);
126
127 /**
128 * Sets other InfluxDB configuration map.
129 *
130 * @param configMap InfluxDB configuration map
131 * @return builder instance
132 */
133 Builder withConfigMap(Map<String, Object> configMap);
134
135 /**
136 * Creates a InfluxDB telemetry config instance.
137 *
138 * @return InfluxDB telemetry config instance
139 */
140 InfluxDbTelemetryConfig build();
141 }
142}