public interface RefManagerService extends SCIFIOService
Service implementation for helping with Reference
management.
The manage(Object, Object...) method creates and registers a
CleaningRef instance with this service, using the given object as its
referent, which allows the CleaningRef.cleanup() method to be handled
on a separate thread.
| Modifier and Type | Method and Description |
|---|---|
void |
manage(Object referent,
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. |
initialize, registerEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposevoid manage(Object referent, Object... params)
CleaningRef 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.
Copyright © 2011–2026 SCIFIO. All rights reserved.