Uploaded image for project: 'Modular Service Container'
  1. Modular Service Container
  2. MSC-83

Add a new mode "LAZY"

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 1.0.0.CR1
    • None
    • None
    • None
    • Low

      The LAZY mode would behave similarly to a service which initially has a mode of ON_DEMAND and has the following code:

      // ...
         public void start(StartContext ctxt) throws StartException {
            ctxt.getController().compareAndSetMode(ON_DEMAND, ACTIVE);
            // ...
         }
      
         public void stop(StopContext ctxt) {
            ctxt.getController().compareAndSetMode(ACTIVE, ON_DEMAND);
            // ...
         }
      // ...
      

      In other words, the service only starts when demandCount > 0, but once it is up it will stay up until forced to stop by mode change or by stopping dependency, at which time it will again require demandCount > 0 before it comes up again.

            flaviarnn Flavia Rainone
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: