org.apache.hadoop.yarn.state

## Interface StateTransitionListener<OPERAND,EVENT,STATE extends Enum<STATE>>

- All Known Implementing Classes:
    MultiStateTransitionListener

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public interface StateTransitionListener<OPERAND,EVENT,STATE extends Enum<STATE>>

  A State Transition Listener. It exposes a pre and post transition hook called before and after the transition.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `postTransition(OPERAND op, STATE beforeState, STATE afterState, EVENT processedEvent)` Post Transition Hook.
    `void` | `preTransition(OPERAND op, STATE beforeState, EVENT eventToBeProcessed)` Pre Transition Hook.

- - ### Method Detail

    - #### preTransition

          void preTransition(OPERAND op,
                             STATE beforeState,
                             EVENT eventToBeProcessed)

      Pre Transition Hook. This will be called before transition.
      Parameters:
        `op` - Operand.
        `beforeState` - State before transition.
        `eventToBeProcessed` - Incoming Event.

    - #### postTransition

          void postTransition(OPERAND op,
                              STATE beforeState,
                              STATE afterState,
                              EVENT processedEvent)

      Post Transition Hook. This will be called after the transition.
      Parameters:
        `op` - Operand.
        `beforeState` - State before transition.
        `afterState` - State after transition.
        `processedEvent` - Processed Event.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.