Annotation Interface DoFn.OnWindowExpiration

Enclosing class:
DoFn<InputT extends @Nullable Object,OutputT extends @Nullable Object>

@Documented @Retention(RUNTIME) @Target(METHOD) public static @interface DoFn.OnWindowExpiration
Annotation for the method to use for performing actions on window expiration. For example, users can use this annotation to write a method that extracts a value saved in a state before it gets garbage collected on window expiration.

The method annotated with @OnWindowExpiration may have parameters according to the same logic as DoFn.OnTimer. See the following code for an example:

new DoFn<KV<Key, Foo>, Baz>() {

   @ProcessElement
    public void processElement(ProcessContext c) {
    }

   @OnWindowExpiration
    public void onWindowExpiration() {
      ...
    }
 }