Class OffloadersCache
java.lang.Object
org.apache.bookkeeper.mledger.offload.OffloadersCache
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getOrLoadOffloaders(String offloadersPath, String narExtractionDirectory) Method to load an Offloaders directory or to get an already loaded Offloaders directory.
-
Constructor Details
-
OffloadersCache
public OffloadersCache()
-
-
Method Details
-
getOrLoadOffloaders
Method to load an Offloaders directory or to get an already loaded Offloaders directory.- Parameters:
offloadersPath- - the directory to search the offloaders nar filesnarExtractionDirectory- - 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:
closein interfaceAutoCloseable
-