Class BaseSeekableChannelContext

java.lang.Object
io.deephaven.util.channel.BaseSeekableChannelContext
All Implemented Interfaces:
SeekableChannelContext, SafeCloseable, AutoCloseable

public class BaseSeekableChannelContext extends Object implements SeekableChannelContext
  • Constructor Details

    • BaseSeekableChannelContext

      public BaseSeekableChannelContext()
  • Method Details

    • getCachedResource

      @Nullable public final <T extends SafeCloseable> T getCachedResource(String key, @NotNull @NotNull Supplier<T> resourceFactory)
      Description copied from interface: SeekableChannelContext
      If this instance holds a resource corresponding to the given key, return it. Otherwise, use the resource factory to create a new resource, store it, and return it. This method can return a null if the factory returns a null.
      Specified by:
      getCachedResource in interface SeekableChannelContext
    • close

      @OverridingMethodsMustInvokeSuper public void close()
      Description copied from interface: SeekableChannelContext
      Release any resources associated with this context. The context should not be used afterward.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
      Specified by:
      close in interface SeekableChannelContext