| 
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.phoenixst.collections.RunnableReaper
public class RunnableReaper
A Runnable which reaps Reapables.
| 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)
Creates and returns a Reference for the given
  arguments. | 
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()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final Reaper DEFAULT_INSTANCE
| Constructor Detail | 
|---|
public RunnableReaper()
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.
public RunnableReaper(long sleepTime)
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.
| Method Detail | 
|---|
public static Reaper getInstance(String name)
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.
public static Reaper getInstance(String name,
                                 long sleepTime,
                                 int threadPriority)
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.
public Reference createReference(Reapable reapable,
                                 Object referent)
ReaperReference for the given
  arguments.  Sometime after the Reference is
  reclaimed by the garbage collector, the argument's Reapable.reap() method will be called.  Please note that there
  is typically no guarantee that this method will ever be
  called, so this mechanism should not be relied upon as a
  replacement for a try/finally block.
  Implementations should never return
  PhantomReferences if the referent needs to be
  retrievable while it is still referencable through other
  paths, or if the Reference.clear() is not
  guaranteed to be called.
createReference in interface Reaperpublic void run()
run in interface Runnable
  | 
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||