@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public static @interface DoFn.Teardown
A runner will do its best to call this method on any given instance to prevent leaks of transient resources, however, there may be situations where this is impossible (e.g. process crash, hardware failure, etc.) or unnecessary (e.g. the pipeline is shutting down and the process is about to be killed anyway, so all transient resources will be released automatically by the OS). In these cases, the call may not happen. It will also not be retried, because in such situations the DoFn instance no longer exists, so there's no instance to retry it on.
Example things that are a good idea to do in this method:
Example things that MUST NOT be done in this method:
The method annotated with this must satisfy the following constraint: