com.phoenixst.collections
public class RunnableReaper extends Object implements Runnable, Reaper
Field Summary | |
---|---|
static Reaper | DEFAULT_INSTANCE
A single default Reaper which to be used when a structure
doesn't mind sharing the reaping thread with other things. |
Constructor Summary | |
---|---|
RunnableReaper()
Creates a new RunnableReaper which sleeps for 0.1
seconds after emptying its internal ReferenceQueue of waiting
References and notifying the corresponding
Reapables . | |
RunnableReaper(long sleepTime)
Creates a new RunnableReaper which sleeps for the
specified number of milliseconds after emptying its internal
ReferenceQueue of waiting References and notifying the
corresponding Reapables . |
Method Summary | |
---|---|
Reference | createReference(Reapable reapable, Object referent) |
static Reaper | getInstance(String name)
Creates a new RunnableReaper which sleeps for 0.1
seconds after emptying its internal ReferenceQueue of waiting
References and notifying the corresponding
Reapables . |
static Reaper | getInstance(String name, long sleepTime, int threadPriority)
Creates a new RunnableReaper which sleeps for the
specified number of milliseconds after emptying its internal
ReferenceQueue of waiting References and notifying the
corresponding Reapables . |
void | run() |
RunnableReaper
which sleeps for 0.1
seconds after emptying its internal ReferenceQueue of waiting
References and notifying the corresponding
Reapables
. It is up to the user to create a
thread to run this Reaper; alternatively, one of the static
factory methods can be used.RunnableReaper
which sleeps for the
specified number of milliseconds after emptying its internal
ReferenceQueue of waiting References and notifying the
corresponding Reapables
. It is up to the user to
create a thread to run this Reaper; alternatively, one of the
static factory methods can be used.RunnableReaper
which sleeps for 0.1
seconds after emptying its internal ReferenceQueue of waiting
References and notifying the corresponding
Reapables
. A new thread of minimum priority to
run the RunnableReaper
is also created and
started by this method.RunnableReaper
which sleeps for the
specified number of milliseconds after emptying its internal
ReferenceQueue of waiting References and notifying the
corresponding Reapables
. A new thread of the
specified priority to run the RunnableReaper
is
also created and started by this method.