Class WindowFunctionExecutor<I,​O>

  • All Implemented Interfaces:
    org.apache.pulsar.functions.api.Function<I,​O>

    public class WindowFunctionExecutor<I,​O>
    extends java.lang.Object
    implements org.apache.pulsar.functions.api.Function<I,​O>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(org.apache.pulsar.functions.api.Context context)  
      protected WindowLifecycleListener<Event<org.apache.pulsar.functions.api.Record<I>>> newWindowLifecycleListener​(org.apache.pulsar.functions.api.Context context)  
      O process​(I input, org.apache.pulsar.functions.api.Context context)  
      O process​(Window<org.apache.pulsar.functions.api.Record<I>> inputWindow, org.apache.pulsar.functions.api.WindowContext context)  
      void shutdown()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.functions.api.Function

        close
    • Field Detail

      • windowConfig

        protected org.apache.pulsar.common.functions.WindowConfig windowConfig
      • waterMarkEventGenerator

        protected transient WaterMarkEventGenerator<org.apache.pulsar.functions.api.Record<I>> waterMarkEventGenerator
      • bareWindowFunction

        protected java.util.function.Function<java.util.Collection<I>,​O> bareWindowFunction
      • windowFunction

        protected org.apache.pulsar.functions.api.WindowFunction<I,​O> windowFunction
    • Constructor Detail

      • WindowFunctionExecutor

        public WindowFunctionExecutor()
    • Method Detail

      • initialize

        public void initialize​(org.apache.pulsar.functions.api.Context context)
        Specified by:
        initialize in interface org.apache.pulsar.functions.api.Function<I,​O>
      • newWindowLifecycleListener

        protected WindowLifecycleListener<Event<org.apache.pulsar.functions.api.Record<I>>> newWindowLifecycleListener​(org.apache.pulsar.functions.api.Context context)
      • shutdown

        public void shutdown()
      • process

        public O process​(I input,
                         org.apache.pulsar.functions.api.Context context)
                  throws java.lang.Exception
        Specified by:
        process in interface org.apache.pulsar.functions.api.Function<I,​O>
        Throws:
        java.lang.Exception
      • process

        public O process​(Window<org.apache.pulsar.functions.api.Record<I>> inputWindow,
                         org.apache.pulsar.functions.api.WindowContext context)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception