StateTransitionListener (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.state, interface: StateTransitionListener

Package org.apache.hadoop.yarn.state

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

@Public @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

  Modifier and Type
  Method
  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 Details

  - ### 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.