Interface StateBackendFactory<T extends StateBackend>

Type Parameters:
T - The type of the state backend created.
All Known Implementing Classes:
HashMapStateBackendFactory

@PublicEvolving public interface StateBackendFactory<T extends StateBackend>
A factory to create a specific state backend. The state backend creation gets a Configuration object that can be used to read further config values.

The state backend factory is typically specified in the configuration to produce a configured state backend.

  • Method Summary

    Modifier and Type
    Method
    Description
    createFromConfig(org.apache.flink.configuration.ReadableConfig config, ClassLoader classLoader)
    Creates the state backend, optionally using the given configuration.
  • Method Details

    • createFromConfig

      T createFromConfig(org.apache.flink.configuration.ReadableConfig config, ClassLoader classLoader) throws org.apache.flink.configuration.IllegalConfigurationException, IOException
      Creates the state backend, optionally using the given configuration.
      Parameters:
      config - The Flink configuration (loaded by the TaskManager).
      classLoader - The class loader that should be used to load the state backend.
      Returns:
      The created state backend.
      Throws:
      org.apache.flink.configuration.IllegalConfigurationException - If the configuration misses critical values, or specifies invalid values
      IOException - If the state backend initialization failed due to an I/O exception