• Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • None
    • None
    • Policy 4/21 - 5/5, Policy 5/6 - 5/20, Policy 23/6 - 7/7

      There are certain review comments that need to be taken care while refactoring Participants with spring boot. 

      Following needs to be considered.

      1.  https://gerrit.onap.org/r/c/policy/clamp/+/121069/1/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/comm/ParticipantStateChangeListener.java
      we should create one parameterized superclass from which they all subclass. Then the methods could be removed altogether, and the constructor turned into a single line. For that matter, if objects of this class are not created using reflection, then the class could be eliminated altogether and the superclass used instead. this comment applies to other similar classes, including the previous one.
       
      2. https://gerrit.onap.org/r/c/policy/clamp/+/121069/1/tosca-controlloop/runtime/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/comm/ParticipantControlLoopUpdatePublisher.java

      common code - maybe replace these classes with a parameterized superclass

      Classes in comm to be replaced and refactored by writing a parameterized superclass.

      3. https://gerrit.onap.org/r/c/policy/clamp/+/121069/1/tosca-controlloop/runtime/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/SupervisionHandler.java#141

      @Override
      public void startAndRegisterPublishers(List<TopicSink> topicSinks) {
      // TODO: Use a parameter for the timeout

      Handle the timeout added in above file.

      4. https://gerrit.onap.org/r/c/policy/clamp/+/121069/1/tosca-controlloop/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/startstop/Main.java

      // Add a shutdown hook to shut everything down in an orderly manner
      Runtime.getRuntime().addShutdownHook(new ClRuntimeShutdownHookClass());

      Comment from PTL: I see this in a lot of our code - does it really get executed? If the activator is not a daemon thread, then this will only be executed if "exit(nnn)" is invoked somewhere. If the activator IS a daemon thread, then where's the non-daemon thread that keeps it from being invoked right off the bat?

       

            FrancescoFioraEst Francesco Fiora
            sirisha_manchikanti sirisha_manchikanti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: