-
Notifications
You must be signed in to change notification settings - Fork 333
Expand file tree
/
Copy pathConfigurationPoller.java
More file actions
49 lines (33 loc) · 1.45 KB
/
ConfigurationPoller.java
File metadata and controls
49 lines (33 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package datadog.remoteconfig;
import datadog.remoteconfig.state.ProductListener;
public interface ConfigurationPoller {
void addListener(Product product, ProductListener listener);
<T> void addListener(
Product product,
ConfigurationDeserializer<T> deserializer,
ConfigurationChangesTypedListener<T> listener);
void addListener(Product product, String configKey, ProductListener listener);
<T> void addListener(
Product product,
String configKey,
ConfigurationDeserializer<T> deserializer,
ConfigurationChangesTypedListener<T> listener);
void addListener(Product product, ConfigurationChangesListener configurationChangesListener);
void removeListeners(Product product);
void addConfigurationEndListener(ConfigurationEndListener listener);
void removeConfigurationEndListener(ConfigurationEndListener listener);
void addCapabilities(long flags);
void removeCapabilities(long flags);
void start();
void stop();
/**
* Registers a listener that is called when a non-retryable HTTP error (e.g. 400, 401, 403, 404)
* is received from the RC endpoint. The default implementation is a no-op.
*/
default void addNonRetryableErrorListener(NonRetryableErrorListener listener) {}
default void removeNonRetryableErrorListener(NonRetryableErrorListener listener) {}
@FunctionalInterface
interface NonRetryableErrorListener {
void onNonRetryableError(int httpStatus, String message);
}
}