org.apache.flume.lifecycle

## Class LifecycleSupervisor

- java.lang.Object
- - org.apache.flume.lifecycle.LifecycleSupervisor

- All Implemented Interfaces:
    LifecycleAware

      public class LifecycleSupervisor
      extends Object
      implements LifecycleAware

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LifecycleSupervisor.MonitorRunnable`
    `static class` | `LifecycleSupervisor.Status`
    `static class` | `LifecycleSupervisor.SupervisorPolicy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LifecycleSupervisor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fail()`
    `LifecycleState` | `getLifecycleState()` Return the current state of the service or component.
    `boolean` | `isComponentInErrorState(LifecycleAware component)`
    `void` | `setDesiredState(LifecycleAware lifecycleAware, LifecycleState desiredState)`
    `void` | `start()` Starts a service or component.
    `void` | `stop()` Stops a service or component.
    `void` | `supervise(LifecycleAware lifecycleAware, LifecycleSupervisor.SupervisorPolicy policy, LifecycleState desiredState)`
    `void` | `unsupervise(LifecycleAware lifecycleAware)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LifecycleSupervisor

          public LifecycleSupervisor()

  - ### Method Detail

    - #### start

          public void start()

      Description copied from interface: `LifecycleAware`

      Starts a service or component.

      Implementations should determine the result of any start logic and effect the return value of `LifecycleAware.getLifecycleState()` accordingly.

      Specified by:
        `start` in interface `LifecycleAware`

    - #### stop

          public void stop()

      Description copied from interface: `LifecycleAware`

      Stops a service or component.

      Implementations should determine the result of any stop logic and effect the return value of `LifecycleAware.getLifecycleState()` accordingly.

      Specified by:
        `stop` in interface `LifecycleAware`

    - #### fail

          public void fail()

    - #### supervise

          public void supervise(LifecycleAware lifecycleAware,
                       LifecycleSupervisor.SupervisorPolicy policy,
                       LifecycleState desiredState)

    - #### unsupervise

          public void unsupervise(LifecycleAware lifecycleAware)

    - #### setDesiredState

          public void setDesiredState(LifecycleAware lifecycleAware,
                             LifecycleState desiredState)

    - #### getLifecycleState

          public LifecycleState getLifecycleState()

      Description copied from interface: `LifecycleAware`

      Return the current state of the service or component.

      Specified by:
        `getLifecycleState` in interface `LifecycleAware`

    - #### isComponentInErrorState

          public boolean isComponentInErrorState(LifecycleAware component)

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.