summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/DelegatingRewriteDeleteProducer.java4
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/HoneycombConfiguration.java27
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfiguration.java13
-rw-r--r--infra/northbound/common/src/main/java/io/fd/honeycomb/northbound/NetconfConfiguration.java44
-rw-r--r--infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java66
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/UpdateFailedException.java4
6 files changed, 79 insertions, 79 deletions
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/DelegatingRewriteDeleteProducer.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/DelegatingRewriteDeleteProducer.java
index e3b3c74dc..855485e75 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/DelegatingRewriteDeleteProducer.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/DelegatingRewriteDeleteProducer.java
@@ -60,8 +60,8 @@ abstract class DelegatingRewriteDeleteProducer implements RewriteDeleteProducer
node.getIdentifier(), node);
}
- private static YangInstanceIdentifier childYangId(final @Nonnull YangInstanceIdentifier topLevelIdentifier,
- final @Nonnull Map.Entry<YangInstanceIdentifier.PathArgument, DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?>> entry) {
+ private static YangInstanceIdentifier childYangId(@Nonnull final YangInstanceIdentifier topLevelIdentifier,
+ @Nonnull final Map.Entry<YangInstanceIdentifier.PathArgument, DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?>> entry) {
return YangInstanceIdentifier.builder(topLevelIdentifier)
.node(entry.getKey()).build();
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/HoneycombConfiguration.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/HoneycombConfiguration.java
index cccbe8e06..cfe14089d 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/HoneycombConfiguration.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/HoneycombConfiguration.java
@@ -31,13 +31,6 @@ import net.jmob.guice.conf.core.Syntax;
@BindConfig(value = "honeycomb", syntax = Syntax.JSON)
public class HoneycombConfiguration {
- public boolean isConfigPersistenceEnabled() {
- return persistConfig.isPresent() && Boolean.valueOf(persistConfig.get());
- }
- public boolean isContextPersistenceEnabled() {
- return persistContext.isPresent() && Boolean.valueOf(persistContext.get());
- }
-
@InjectConfig("persist-context")
public Optional<String> persistContext = Optional.of("true");
@InjectConfig("persisted-context-path")
@@ -53,14 +46,22 @@ public class HoneycombConfiguration {
@InjectConfig("notification-service-queue-depth")
public int notificationServiceQueueDepth;
+ public boolean isConfigPersistenceEnabled() {
+ return persistConfig.isPresent() && Boolean.valueOf(persistConfig.get());
+ }
+
+ public boolean isContextPersistenceEnabled() {
+ return persistContext.isPresent() && Boolean.valueOf(persistContext.get());
+ }
+
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
- .add("peristContextPath", peristContextPath)
- .add("persistedContextRestorationType", persistedContextRestorationType)
- .add("peristConfigPath", peristConfigPath)
- .add("persistedConfigRestorationType", persistedConfigRestorationType)
- .add("notificationServiceQueueDepth", notificationServiceQueueDepth)
- .toString();
+ .add("peristContextPath", peristContextPath)
+ .add("persistedContextRestorationType", persistedContextRestorationType)
+ .add("peristConfigPath", peristConfigPath)
+ .add("persistedConfigRestorationType", persistedConfigRestorationType)
+ .add("notificationServiceQueueDepth", notificationServiceQueueDepth)
+ .toString();
}
}
diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfiguration.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfiguration.java
index 56a00ecb0..b651c4c0a 100644
--- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfiguration.java
+++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfiguration.java
@@ -23,18 +23,14 @@ import net.jmob.guice.conf.core.InjectConfig;
import net.jmob.guice.conf.core.Syntax;
/**
- * This is the Java equivalent for bgp.json file. We use guice-config library to load all the config attributes
- * into this class instance.
+ * This is the Java equivalent for bgp.json file. We use guice-config library to load all the config attributes into
+ * this class instance.
*
* The BindConfig annotation tells that bgp.json file should be looked up on classpath root.
*/
@BindConfig(value = "bgp", syntax = Syntax.JSON)
public class BgpConfiguration {
- public boolean isBgpMultiplePathsEnabled() {
- return Boolean.valueOf(bgpMultiplePaths.get());
- }
-
@InjectConfig("bgp-binding-address")
public Optional<String> bgpBindingAddress;
@InjectConfig("bgp-port")
@@ -51,6 +47,11 @@ public class BgpConfiguration {
public Optional<String> bgpProtocolInstanceName;
@InjectConfig("bgp-netty-threads")
public Integer bgpNettyThreads;
+
+ public boolean isBgpMultiplePathsEnabled() {
+ return Boolean.valueOf(bgpMultiplePaths.get());
+ }
+
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
diff --git a/infra/northbound/common/src/main/java/io/fd/honeycomb/northbound/NetconfConfiguration.java b/infra/northbound/common/src/main/java/io/fd/honeycomb/northbound/NetconfConfiguration.java
index 98d64d017..b015e355c 100644
--- a/infra/northbound/common/src/main/java/io/fd/honeycomb/northbound/NetconfConfiguration.java
+++ b/infra/northbound/common/src/main/java/io/fd/honeycomb/northbound/NetconfConfiguration.java
@@ -24,18 +24,6 @@ import net.jmob.guice.conf.core.Syntax;
@BindConfig(value = "netconf", syntax = Syntax.JSON)
public class NetconfConfiguration {
- public boolean isNetconfTcpEnabled() {
- return Boolean.valueOf(netconfTcp);
- }
-
- public boolean isNetconfSshEnabled() {
- return Boolean.valueOf(netconfSsh);
- }
-
- public boolean isNetconfEnabled() {
- return isNetconfTcpEnabled() || isNetconfSshEnabled();
- }
-
@InjectConfig("netconf-netty-threads")
public Integer netconfNettyThreads;
@InjectConfig("netconf-tcp-enabled")
@@ -53,17 +41,29 @@ public class NetconfConfiguration {
@InjectConfig("netconf-notification-stream-name")
public Optional<String> netconfNotificationStreamName = Optional.of("honeycomb");
+ public boolean isNetconfTcpEnabled() {
+ return Boolean.valueOf(netconfTcp);
+ }
+
+ public boolean isNetconfSshEnabled() {
+ return Boolean.valueOf(netconfSsh);
+ }
+
+ public boolean isNetconfEnabled() {
+ return isNetconfTcpEnabled() || isNetconfSshEnabled();
+ }
+
@Override
public String toString() {
- return "NetconfConfiguration{" +
- "netconfNettyThreads=" + netconfNettyThreads +
- ", netconfTcp='" + netconfTcp + '\'' +
- ", netconfTcpBindingAddress=" + netconfTcpBindingAddress +
- ", netconfTcpBindingPort=" + netconfTcpBindingPort +
- ", netconfSsh='" + netconfSsh + '\'' +
- ", netconfSshBindingAddress=" + netconfSshBindingAddress +
- ", netconfSshBindingPort=" + netconfSshBindingPort +
- ", netconfNotificationStreamName=" + netconfNotificationStreamName +
- '}';
+ return "NetconfConfiguration{"
+ + "netconfNettyThreads=" + netconfNettyThreads
+ + ", netconfTcp='" + netconfTcp + '\''
+ + ", netconfTcpBindingAddress=" + netconfTcpBindingAddress
+ + ", netconfTcpBindingPort=" + netconfTcpBindingPort
+ + ", netconfSsh='" + netconfSsh + '\''
+ + ", netconfSshBindingAddress=" + netconfSshBindingAddress
+ + ", netconfSshBindingPort=" + netconfSshBindingPort
+ + ", netconfNotificationStreamName=" + netconfNotificationStreamName
+ + '}';
}
}
diff --git a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
index a02429b26..78bc39dd6 100644
--- a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
+++ b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
@@ -25,18 +25,6 @@ import net.jmob.guice.conf.core.Syntax;
@BindConfig(value = "restconf", syntax = Syntax.JSON)
public class RestconfConfiguration {
- public boolean isRestconfHttpEnabled() {
- return Boolean.valueOf(restconfHttp);
- }
-
- public boolean isRestconfHttpsEnabled() {
- return Boolean.valueOf(restconfHttps);
- }
-
- public boolean isRestconfEnabled() {
- return isRestconfHttpEnabled() || isRestconfHttpsEnabled();
- }
-
@InjectConfig("restconf-http-enabled")
public String restconfHttp;
@InjectConfig("restconf-binding-address")
@@ -49,7 +37,6 @@ public class RestconfConfiguration {
public Optional<String> restconfHttpsBindingAddress;
@InjectConfig("restconf-https-port")
public Optional<Integer> restconfHttpsPort;
-
/**
* Restconf keystore file name. It will be loaded from the classpath so must be present in one of the folders
* packaged with the distribution e.g. cert/
@@ -60,7 +47,6 @@ public class RestconfConfiguration {
public Optional<String> keystorePassword;
@InjectConfig("restconf-keystore-manager-password")
public Optional<String> keystoreManagerPassword;
-
/**
* Restconf truststore file name. It will be loaded from the classpath so must be present in one of the folders
* packaged with the distribution e.g. cert/
@@ -86,28 +72,40 @@ public class RestconfConfiguration {
@InjectConfig("restconf-https-selectors-size")
public Optional<Integer> httpsSelectorsSize = Optional.of(1);
+ public boolean isRestconfHttpEnabled() {
+ return Boolean.valueOf(restconfHttp);
+ }
+
+ public boolean isRestconfHttpsEnabled() {
+ return Boolean.valueOf(restconfHttps);
+ }
+
+ public boolean isRestconfEnabled() {
+ return isRestconfHttpEnabled() || isRestconfHttpsEnabled();
+ }
+
@Override
public String toString() {
return "RestconfConfiguration{" +
- "restconfHttp='" + restconfHttp + '\'' +
- ", restconfBindingAddress=" + restconfBindingAddress +
- ", restconfPort=" + restconfPort +
- ", restconfHttps='" + restconfHttps + '\'' +
- ", restconfHttpsBindingAddress=" + restconfHttpsBindingAddress +
- ", restconfHttpsPort=" + restconfHttpsPort +
- ", restconfKeystore=" + restconfKeystore +
- ", keystorePassword=" + keystorePassword +
- ", keystoreManagerPassword=" + keystoreManagerPassword +
- ", restconfTruststore=" + restconfTruststore +
- ", truststorePassword=" + truststorePassword +
- ", restconfWebsocketPort=" + restconfWebsocketPort +
- ", restconfRootPath=" + restconfRootPath +
- ", restPoolMaxSize=" + restPoolMaxSize +
- ", restPoolMinSize=" + restPoolMinSize +
- ", acceptorsSize=" + acceptorsSize +
- ", selectorsSize=" + selectorsSize +
- ", httpsAcceptorsSize=" + httpsAcceptorsSize +
- ", httpsSelectorsSize=" + httpsSelectorsSize +
- '}';
+ "restconfHttp='" + restconfHttp + '\'' +
+ ", restconfBindingAddress=" + restconfBindingAddress +
+ ", restconfPort=" + restconfPort +
+ ", restconfHttps='" + restconfHttps + '\'' +
+ ", restconfHttpsBindingAddress=" + restconfHttpsBindingAddress +
+ ", restconfHttpsPort=" + restconfHttpsPort +
+ ", restconfKeystore=" + restconfKeystore +
+ ", keystorePassword=" + keystorePassword +
+ ", keystoreManagerPassword=" + keystoreManagerPassword +
+ ", restconfTruststore=" + restconfTruststore +
+ ", truststorePassword=" + truststorePassword +
+ ", restconfWebsocketPort=" + restconfWebsocketPort +
+ ", restconfRootPath=" + restconfRootPath +
+ ", restPoolMaxSize=" + restPoolMaxSize +
+ ", restPoolMinSize=" + restPoolMinSize +
+ ", acceptorsSize=" + acceptorsSize +
+ ", selectorsSize=" + selectorsSize +
+ ", httpsAcceptorsSize=" + httpsAcceptorsSize +
+ ", httpsSelectorsSize=" + httpsSelectorsSize +
+ '}';
}
}
diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/UpdateFailedException.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/UpdateFailedException.java
index c5848f20d..0b65bedea 100644
--- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/UpdateFailedException.java
+++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/UpdateFailedException.java
@@ -30,8 +30,8 @@ import javax.annotation.Nonnull;
public class UpdateFailedException extends TranslationException {
private static final long serialVersionUID = 896331856485410043L;
- private transient final List<DataObjectUpdate> processed;
- private transient final DataObjectUpdate failed;
+ private final transient List<DataObjectUpdate> processed;
+ private final transient DataObjectUpdate failed;
/**
* @param cause original cause of failure