public class DefaultRefManagerService extends org.scijava.service.AbstractService implements RefManagerService
RefManagerService implementation.| Constructor and Description |
|---|
DefaultRefManagerService() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Signal to any active
RefCleaner that this service has been
disposed. |
void |
initialize() |
void |
manage(Object toManage,
Object... params)
If there is a corresponding
CleaningRef for the given object, it
will be created using the given object as its referent and attached to a
reference queue. |
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic void manage(Object toManage, Object... params)
RefManagerServiceCleaningRef for the given object, it
will be created using the given object as its referent and attached to a
reference queue. A separate thread will poll the queue, and whenever a
reference is dequeued its CleaningRef.cleanup() method will be
invoked.
NB: no more than one of a given Reference type will be managed for a given referent. An object shouldn't require more than one cleanup for a given usage.
manage in interface RefManagerServicepublic void dispose()
RefCleaner that this service has been
disposed. That should trigger an end of polling operations.dispose in interface org.scijava.Disposablepublic void initialize()
initialize in interface org.scijava.Initializableinitialize in interface org.scijava.service.ServiceCopyright © 2011–2026 SCIFIO. All rights reserved.