|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.jms.service.Service
org.exolab.jms.gc.GarbageCollectionService
public class GarbageCollectionService
The garbage collection service is responsible for managing all transient
garbage collection for OpenJMS, which includes messages, destinations,
endpoints etc. It does not deal with persistent data, which is handled
through the database service. Other services or managers can register
themselves with GarbageCollectionService if they implement the GarbageCollectable
interface.
BasicEventManager
to register events
for garbage collection.
Constructor Summary | |
---|---|
GarbageCollectionService(org.exolab.jms.config.Configuration config,
EventManager eventMgr)
Create an instance of a garbage collection service. |
Method Summary | |
---|---|
boolean |
belowLowWaterThreshold()
Check whether the low water threshold has been reached. |
void |
doStart()
Start the service. |
void |
handleEvent(int event,
java.lang.Object callback,
long time)
Handle the specified event, generated by the EventManager . |
void |
register(GarbageCollectable entry)
Register an entity that wishes to participate in the garbage collection process. |
void |
unregister(GarbageCollectable entry)
Unregister the specified entry from the list of garbge collectable entities |
Methods inherited from class org.exolab.jms.service.Service |
---|
doStop, getName, isStarted, restart, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GarbageCollectionService(org.exolab.jms.config.Configuration config, EventManager eventMgr)
config
- the configuration to useeventMgr
- the event managerMethod Detail |
---|
public boolean belowLowWaterThreshold()
public void register(GarbageCollectable entry)
entry
- the entry to add to listpublic void unregister(GarbageCollectable entry)
entry
- - entry to removepublic void doStart() throws ServiceException
Service
doStart
in class Service
ServiceException
- if the service fails to startpublic void handleEvent(int event, java.lang.Object callback, long time)
EventHandler
EventManager
.
handleEvent
in interface EventHandler
event
- the event to handlecallback
- the callback objecttime
- the absolute time, in ms, that the event fired
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |