Class OffloadersCache

  • All Implemented Interfaces:
    java.lang.AutoCloseable

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

      Constructors 
      Constructor Description
      OffloadersCache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Offloaders getOrLoadOffloaders​(java.lang.String offloadersPath, java.lang.String narExtractionDirectory)
      Method to load an Offloaders directory or to get an already loaded Offloaders directory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OffloadersCache

        public OffloadersCache()
    • Method Detail

      • getOrLoadOffloaders

        public Offloaders getOrLoadOffloaders​(java.lang.String offloadersPath,
                                              java.lang.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:
        java.io.IOException - when fail to retrieve the pulsar offloader class
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable