class_docstr: This class defines methods to generate RestartStrategyConfigurations. These configurations are
  used to create RestartStrategies at runtime.
  
  The RestartStrategyConfigurations are used to decouple the core module from the runtime module.
class_docstr_tok: ["This","class","defines","methods","to","generate","RestartStrategyConfigurations",".","These","configurations","are","used","to","create","RestartStrategies","at","runtime",".","The","RestartStrategyConfigurations","are","used","to","decouple","the","core","module","from","the","runtime","module","."]
code: def _from_j_restart_strategy(
      j_restart_strategy,
  ) -> Optional[RestartStrategyConfiguration]:
      if j_restart_strategy is None:
          return None
      gateway = get_gateway()
      NoRestartStrategyConfiguration = (
          gateway.jvm.RestartStrategies.NoRestartStrategyConfiguration
      )
      FixedDelayRestartStrategyConfiguration = (
          gateway.jvm.RestartStrategies.FixedDelayRestartStrategyConfiguration
      )
      FailureRateRestartStrategyConfiguration = (
          gateway.jvm.RestartStrategies.FailureRateRestartStrategyConfiguration
      )
      FallbackRestartStrategyConfiguration = (
          gateway.jvm.RestartStrategies.FallbackRestartStrategyConfiguration
      )
      clz = j_restart_strategy.getClass()
      if (
          clz.getName()
          == get_java_class(NoRestartStrategyConfiguration).getName()
      ):
          return RestartStrategies.NoRestartStrategyConfiguration(
              j_restart_strategy=j_restart_strategy
          )
      elif (
          clz.getName()
          == get_java_class(
              FixedDelayRestartStrategyConfiguration
          ).getName()
      ):
          return (
              RestartStrategies.FixedDelayRestartStrategyConfiguration(
                  j_restart_strategy=j_restart_strategy
              )
          )
      elif (
          clz.getName()
          == get_java_class(
              FailureRateRestartStrategyConfiguration
          ).getName()
      ):
          return (
              RestartStrategies.FailureRateRestartStrategyConfiguration(
                  j_restart_strategy=j_restart_strategy
              )
          )
      elif (
          clz.getName()
          == get_java_class(
              FallbackRestartStrategyConfiguration
          ).getName()
      ):
          return RestartStrategies.FallbackRestartStrategyConfiguration(
              j_restart_strategy=j_restart_strategy
          )
      else:
          raise Exception(
              "Unsupported java RestartStrategyConfiguration: %s"
              % clz.getName()
          )
  
file_path: flink/flink-python/pyflink/common/restart_strategy.py
imports: from abc import ABCMeta
  from datetime import timedelta
  from typing import Optional
  from py4j.java_gateway import get_java_class
  from pyflink.java_gateway import get_gateway
  from pyflink.util.java_utils import to_j_flink_time, from_j_flink_time
label_desc: Use image node_id 1 for calling the RestartStrategies obj's underlying member method code with example usage: obj._from_j_restart_strategy(j_restart_strategy) and returns: None, RestartStrategies, RestartStrategies, RestartStrategies, RestartStrategies