com.atlassian.plugin.tracker
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

Nested Class Summary
static interface PluginModuleTracker.Customizer<M,T extends ModuleDescriptor<M>>
          Implement this to customize how and which descriptors are stored
 
Method Summary
 void close()
          Closes the tracker.
 Iterable<T> getModuleDescriptors()
           
 Iterable<M> getModules()
          Gets a snapshot of the currently tracked enabled module instances
 int size()
           
 

Method Detail

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.



Copyright © 2015 Atlassian. All rights reserved.