Interface PluginModuleTracker<M,T extends ModuleDescriptor<M>>

All Known Implementing Classes:
DefaultPluginModuleTracker

public interface PluginModuleTracker<M,T extends ModuleDescriptor<M>>
Tracks enabled plugin module descriptors, focusing on fast reads. Patterned off the ServiceTracker.
Since:
2.6.0
  • Method Details

    • getModuleDescriptors

      Iterable<T> getModuleDescriptors()
      Returns:
      a snapshot of the currently tracked enabled module descriptors
    • getModules

      Iterable<M> getModules()
      Gets a snapshot of the currently tracked enabled module instances
      Returns:
      The module instances
    • size

      int size()
      Returns:
      The number of module descriptors currently tracked. Should only be used for reporting purposes as it only reflects the size at exactly the calling time.
    • close

      void close()
      Closes the tracker. Ensure you call this, or you may cause a memory leak.