Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-6455

Use an Internal State instead of boolean flags to modeling the process transition to Restart/Reload required when the process is starting

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 22.0.0.Beta2
    • Server
    • None

      This issue follows up on WFCORE-6434.

      WFCORE-6434 added two additional boolean flags to modeling the process transition to restart / reload required when the process is starting.

      During WFCORE-6434, bstansbe@redhat.com added the following suggestion:

      "I had a thought this morning for further improvement in the future. Create a new InternalState enum that encapsulates State, reloadRequiredOnStarting and restartRequiredOnStarting. Then the 'state' var stores InternalState, not State. Then we just do state transitions, instead of manipulating multiple fields. Besides probably being cleaner looking over all, that eliminates the somewhat 'magic' behavior in my commit from yesterday where setReload/RestartRequired return the current stamp when was == STARTING. Instead any caller gets a unique stamp and there's no fragility where someday a maintainer breaks the current magic."

      So the task here is to check how to replace the reloadRequiredOnStarting/restartRequiredOnStarting by an internal state and avoid the fragily/complexity of using boolean flags.

            yborgess1@redhat.com Yeray Borges Santana
            yborgess1@redhat.com Yeray Borges Santana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: