Class DeferredStream.CloseHandler

java.lang.Object
org.apache.sis.internal.stream.DeferredStream.CloseHandler
All Implemented Interfaces:
Runnable
Enclosing class:
DeferredStream<T>

private static final class DeferredStream.CloseHandler extends Object implements Runnable
Implementation of DeferredStream.closeHandler. This class allows to invoke BaseStream.onClose(Runnable) early while specifying the actual close action later, at DeferredStream.createSourceIterator() invocation time. This is necessary because it is too late to register a close handler on the stream when the worker is created, because the terminal operation already started at that time.
  • Field Details

  • Constructor Details

    • CloseHandler

      private CloseHandler()
  • Method Details

    • run

      public void run()
      Invoked by the stream for disposing the resources.
      Specified by:
      run in interface Runnable