|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.baseadaptor.bundlefile.MRUBundleFileList
public class MRUBundleFileList
A simple/quick/small implementation of an MRU (Most Recently Used) list to keep track of open BundleFiles. The MRU will use the file limit specified by the property "osgi.bundlefile.limit" by default unless the MRU is constructed with a specific file limit.
Constructor Summary | |
---|---|
MRUBundleFileList()
|
|
MRUBundleFileList(int fileLimit)
|
Method Summary | |
---|---|
void |
add(BundleFile bundleFile)
Adds a BundleFile which is about to be opened to the MRU list. |
void |
dispatchEvent(java.lang.Object eventListener,
java.lang.Object listenerObject,
int eventAction,
java.lang.Object eventObject)
This method is called once for each listener. |
boolean |
remove(BundleFile bundleFile)
Removes a bundle file which is about to be closed |
void |
shutdown()
Closes the bundle file closer thread for the MRU list |
void |
use(BundleFile bundleFile)
Increments the use stamp of a bundle file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MRUBundleFileList()
public MRUBundleFileList(int fileLimit)
Method Detail |
---|
public void add(BundleFile bundleFile)
bundleFile
- the bundle file about to be opened.public boolean remove(BundleFile bundleFile)
bundleFile
- the bundle file about to be closed
public void use(BundleFile bundleFile)
bundleFile
- the bundle file to increment the use stamp forpublic final void dispatchEvent(java.lang.Object eventListener, java.lang.Object listenerObject, int eventAction, java.lang.Object eventObject)
EventDispatcher
The method should properly log/handle any exceptions thrown by the called listener. The EventManager will ignore any Throwable thrown by this method in order to continue delivery of the event to the next listener.
dispatchEvent
in interface EventDispatcher
eventListener
- This listener must be cast to the appropriate listener
class for the event to be delivered and the appropriate listener method
must then be called.listenerObject
- This is the optional companion object that was
specified when the listener was added to the EventListeners object.eventAction
- This value was passed to the ListenerQueue object via one of its
dispatchEvent* method calls. It can provide information (such
as which listener method to call) so that the EventDispatcher
can complete the delivery of the event to the listener.eventObject
- This object was passed to the ListenerQueue object via one of its
dispatchEvent* method calls. This object was created by the event source and
is passed to this method. It should contain all the necessary information (such
as what event object to pass) so that this method
can complete the delivery of the event to the listener.
This is typically the actual event object.public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |