org.norther.tammi.core.monitor
Interface Finalizer

All Superinterfaces:
Executable, Runnable, Startable
All Known Implementing Classes:
DefaultFinalizer

public interface Finalizer
extends Executable

An interface to reference queues for referents to be finalized before garbage collected.

Author:
Ilkka Priha

Method Summary
 PhantomReference addPhantomListener(Object referent, QueueListener listener)
          Adds a new phantom reference to the reference queue and registers its listener.
 SoftReference addSoftListener(Object referent, QueueListener listener)
          Adds a new soft reference to the reference queue and registers its listener.
 WeakReference addWeakListener(Object referent, QueueListener listener)
          Adds a new weak reference to the reference queue and registers its listener.
 void removeListener(Reference reference)
          Removes the registered listener of a reference.
 
Methods inherited from interface org.norther.tammi.core.thread.Executable
getExecutorName, setExecutorName
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted, start, stop
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addPhantomListener

PhantomReference addPhantomListener(Object referent,
                                    QueueListener listener)
Adds a new phantom reference to the reference queue and registers its listener.

Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new phantom reference.

addWeakListener

WeakReference addWeakListener(Object referent,
                              QueueListener listener)
Adds a new weak reference to the reference queue and registers its listener.

Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new weak reference.

addSoftListener

SoftReference addSoftListener(Object referent,
                              QueueListener listener)
Adds a new soft reference to the reference queue and registers its listener.

Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new soft reference.

removeListener

void removeListener(Reference reference)
Removes the registered listener of a reference.

Parameters:
reference - the reference.


Copyright © 2004 The Norther Organization. All rights reserved.