Class OffloadersCache

java.lang.Object
org.apache.bookkeeper.mledger.offload.OffloadersCache
All Implemented Interfaces:
AutoCloseable

public class OffloadersCache extends Object implements AutoCloseable
Implementation of an Offloaders. The main purpose of this class is to ensure that an Offloaders directory is only loaded once.
  • Constructor Details

    • OffloadersCache

      public OffloadersCache()
  • Method Details

    • getOrLoadOffloaders

      public Offloaders getOrLoadOffloaders(String offloadersPath, String narExtractionDirectory)
      Method to load an Offloaders directory or to get an already loaded Offloaders directory.
      Parameters:
      offloadersPath - - the directory to search the offloaders nar files
      narExtractionDirectory - - the directory to use for extraction
      Returns:
      the loaded offloaders class
      Throws:
      IOException - when fail to retrieve the pulsar offloader class
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable