[MINOR] Metrics: reinstated get/setWhitelist with Deprecated warning (#1142)

* reinstated get/setWhitelist with Deprecated warning

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
pull/1132/head
Sally MacFarlane 4 years ago committed by GitHub
parent f5dd1db9b6
commit df647a7a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/MetricsConfiguration.java

@ -121,6 +121,12 @@ public class MetricsConfiguration {
return prometheusJob;
}
// use getHostsAllowlist instead
@Deprecated
Collection<String> getHostsWhitelist() {
return Collections.unmodifiableCollection(this.hostsAllowlist);
}
Collection<String> getHostsAllowlist() {
return Collections.unmodifiableCollection(this.hostsAllowlist);
}
@ -241,6 +247,13 @@ public class MetricsConfiguration {
return this;
}
// use hostsAllowlist instead
@Deprecated
public Builder hostsWhitelist(final List<String> hostsAllowlist) {
this.hostsAllowlist = hostsAllowlist;
return this;
}
public Builder hostsAllowlist(final List<String> hostsAllowlist) {
this.hostsAllowlist = hostsAllowlist;
return this;

Loading…
Cancel
Save