Skip to content

Package: MqttClientPoolSettingKeys

MqttClientPoolSettingKeys

nameinstructionbranchcomplexitylinemethod
MqttClientPoolSettingKeys(String, int, String)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
key()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 114 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 11 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.transport.mqtt.pooling.setting;
14:
15: import org.eclipse.kapua.commons.setting.SettingKey;
16: import org.eclipse.kapua.transport.mqtt.MqttClient;
17:
18: /**
19: * Available settings key for MQTT client pool for MQTT transport level
20: *
21: * @since 1.0.0
22: */
23: public enum MqttClientPoolSettingKeys implements SettingKey {
24:
25: /**
26: * The prefix for the id set to the {@link MqttClient}
27: *
28: * @since 1.0.0
29: */
30: CLIENT_POOL_CLIENT_ID_PREFIX("client.pool.client.id.prefix"),
31:
32: /**
33: * The minimum size for the client pool.
34: *
35: * @since 1.0.0
36: */
37: CLIENT_POOL_SIZE_IDLE_MIN("client.pool.size.idle.min"),
38:
39: /**
40: * The maximum size for the client pool.
41: *
42: * @since 1.0.0
43: */
44: CLIENT_POOL_SIZE_IDLE_MAX("client.pool.size.idle.max"),
45:
46: /**
47: * FIXME [javadoc] document property
48: *
49: * @since 1.0.0
50: */
51: CLIENT_POOL_SIZE_TOTAL_MAX("client.pool.size.total.max"),
52:
53: /**
54: * The max time to wait an available {@link MqttClient}
55: *
56: * @since 1.0.0
57: */
58: CLIENT_POOL_BORROW_WAIT_MAX("client.pool.borrow.wait.max"),
59:
60: /**
61: * The time interval between each eviction on the client pool
62: *
63: * @since 1.0.0
64: */
65: CLIENT_POOL_EVICTION_INTERVAL("client.pool.eviction.interval"),
66:
67: /**
68: * FIXME [javadoc] document property
69: *
70: * @since 1.0.0
71: */
72: CLIENT_POOL_WHEN_EXAUSTED_BLOCK("client.pool.when.exhausted.block"),
73:
74: /**
75: * FIXME [javadoc] document property
76: *
77: * @since 1.0.0
78: */
79: CLIENT_POOL_WHEN_IDLE_TEST("client.pool.when.idle.test"),
80:
81: /**
82: * Checks client status when borrowing client from the pool.
83: *
84: * @since 1.0.0
85: */
86: CLIENT_POOL_ON_BORROW_TEST("client.pool.on.borrow.test"),
87:
88: /**
89: * Checks client status when returning client to the pool.
90: *
91: * @since 1.0.0
92: */
93: CLIENT_POOL_ON_RETURN_TEST("client.pool.on.return.test"),
94: ;
95:
96: /**
97: * The key value in the configuration resources.
98: *
99: * @since 1.0.0
100: */
101: private String key;
102:
103: /**
104: * Set up the {@code enum} with the key value provided
105: *
106: * @param key
107: * The value mapped by this {@link Enum} value
108: * @since 1.0.0
109: */
110: private MqttClientPoolSettingKeys(String key) {
111: this.key = key;
112: }
113:
114: /**
115: * Gets the key for this {@link MqttClientPoolSettingKeys}
116: *
117: * @since 1.0.0
118: */
119: public String key() {
120: return key;
121: }
122: }