Class JvmInitializers


  • public class JvmInitializers
    extends java.lang.Object
    Helpers for executing JvmInitializer implementations.
    • Constructor Summary

      Constructors 
      Constructor Description
      JvmInitializers()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void runBeforeProcessing​(org.apache.beam.sdk.options.PipelineOptions options)
      Finds all registered implementations of JvmInitializer and executes their beforeProcessing methods.
      static void runOnStartup()
      Finds all registered implementations of JvmInitializer and executes their onStartup methods.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JvmInitializers

        public JvmInitializers()
    • Method Detail

      • runOnStartup

        public static void runOnStartup()
        Finds all registered implementations of JvmInitializer and executes their onStartup methods. Should be called in worker harness implementations at the very beginning of their main method.
      • runBeforeProcessing

        public static void runBeforeProcessing​(org.apache.beam.sdk.options.PipelineOptions options)
        Finds all registered implementations of JvmInitializer and executes their beforeProcessing methods. Should be called in worker harness implementations after initialization but before beginning to process any data.
        Parameters:
        options - The pipeline options passed to the worker.