Optimize and refactor EventPublisher class in VES 29/42429/6
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Wed, 11 Apr 2018 14:29:30 +0000 (16:29 +0200)
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>
Thu, 12 Apr 2018 12:44:29 +0000 (14:44 +0200)
commit17859bdd1f24904d2a9162a1a43f9db222750f4a
tree30b10e32d2554807065c7679f56a86f2831e60b3
parent88d7666478e5e98e24ef32637a7580c9809f9458
Optimize and refactor EventPublisher class in VES

* Remove need for having sendEvent synchronized by means of using
  Guava LoadingCache. The only thing that made it synchronized was the
  creation of new entries in the map but the synchronization was made
  on each incoming event.
* Split the class to smaller classes which conform to SRP. This makes us
  able to...
* ... write unit tests for affected classes
* TODO: upgrade to Java8 so lambdas will simplify the code even more

Change-Id: I14cf4cfab0570ce5aecc9a5e5dc9f541c499f9d7
Issue-ID: DCAEGEN2-440
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
pom.xml
src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java [new file with mode: 0644]
src/main/java/org/onap/dcae/commonFunction/DmaapPublishers.java [new file with mode: 0644]
src/main/java/org/onap/dcae/commonFunction/EventPublisherHash.java
src/test/java/org/onap/dcae/commonFunction/DmaapPublishersTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/commonFunction/EventPublisherHashTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/vestest/TestEventProcessor.java
src/test/resources/test_collector_ip_op.properties