From 269e543ba89dbf553fc66227f7123a302f56b5b4 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 10 Aug 2018 14:45:45 -0400 Subject: Remove simple checkstyle Mostly concentrated on the period at the end of summary. But I did clear a few others for longer than 120 characters and placement of methods next to each other. Possibly a few others. I did not clear everything, but will submit a few more reviews to get the others. Issue-ID: POLICY-881 Change-Id: I692a5349d686d52fee4040757cdc2ed8b5cc221b Signed-off-by: Pamela Dragosh --- .../event/comm/bus/UebTopicSourceFactory.java | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java') diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java index 8d3f28e9..c4a69831 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java @@ -34,12 +34,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * UEB Topic Source Factory + * UEB Topic Source Factory. */ public interface UebTopicSourceFactory { /** - * Creates an UEB Topic Source based on properties files + * Creates an UEB Topic Source based on properties files. * * @param properties Properties containing initialization values * @@ -49,7 +49,7 @@ public interface UebTopicSourceFactory { public List build(Properties properties); /** - * Instantiates a new UEB Topic Source + * Instantiates a new UEB Topic Source. * * @param servers list of servers * @param topic topic name @@ -65,11 +65,12 @@ public interface UebTopicSourceFactory { * @throws IllegalArgumentException if invalid parameters are present */ public UebTopicSource build(List servers, String topic, String apiKey, String apiSecret, - String consumerGroup, String consumerInstance, int fetchTimeout, int fetchLimit, boolean managed, + String consumerGroup, String consumerInstance, + int fetchTimeout, int fetchLimit, boolean managed, boolean useHttps, boolean allowSelfSignedCerts); /** - * Instantiates a new UEB Topic Source + * Instantiates a new UEB Topic Source. * * @param servers list of servers * @param topic topic name @@ -82,7 +83,7 @@ public interface UebTopicSourceFactory { public UebTopicSource build(List servers, String topic, String apiKey, String apiSecret); /** - * Instantiates a new UEB Topic Source + * Instantiates a new UEB Topic Source. * * @param servers list of servers * @param topic topic name @@ -93,7 +94,7 @@ public interface UebTopicSourceFactory { public UebTopicSource build(List servers, String topic); /** - * Destroys an UEB Topic Source based on a topic + * Destroys an UEB Topic Source based on a topic. * * @param topic topic name * @throws IllegalArgumentException if invalid parameters are present @@ -101,12 +102,12 @@ public interface UebTopicSourceFactory { public void destroy(String topic); /** - * Destroys all UEB Topic Sources + * Destroys all UEB Topic Sources. */ public void destroy(); /** - * gets an UEB Topic Source based on topic name + * Gets an UEB Topic Source based on topic name. * * @param topic the topic name * @return an UEB Topic Source with topic name @@ -116,7 +117,7 @@ public interface UebTopicSourceFactory { public UebTopicSource get(String topic); /** - * Provides a snapshot of the UEB Topic Sources + * Provides a snapshot of the UEB Topic Sources. * * @return a list of the UEB Topic Sources */ @@ -127,18 +128,18 @@ public interface UebTopicSourceFactory { /* ------------- implementation ----------------- */ /** - * Factory of UEB Source Topics indexed by topic name + * Factory of UEB Source Topics indexed by topic name. */ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory { private static final String MISSING_TOPIC = "A topic must be provided"; /** - * Logger + * Logger. */ private static Logger logger = LoggerFactory.getLogger(IndexedUebTopicSourceFactory.class); /** - * UEB Topic Name Index + * UEB Topic Name Index. */ protected HashMap uebTopicSources = new HashMap<>(); @@ -325,6 +326,18 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory { uebTopicSource.shutdown(); } + @Override + public void destroy() { + List readers = this.inventory(); + for (UebTopicSource reader : readers) { + reader.shutdown(); + } + + synchronized (this) { + this.uebTopicSources.clear(); + } + } + /** * {@inheritDoc} */ @@ -349,18 +362,6 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory { return new ArrayList<>(this.uebTopicSources.values()); } - @Override - public void destroy() { - List readers = this.inventory(); - for (UebTopicSource reader : readers) { - reader.shutdown(); - } - - synchronized (this) { - this.uebTopicSources.clear(); - } - } - @Override public String toString() { StringBuilder builder = new StringBuilder(); -- cgit 1.2.3-korg