org.apache.jcs.utils.locking
Class RwLockGC

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.apache.jcs.utils.locking.RwLockGC
All Implemented Interfaces:
java.lang.Runnable

public class RwLockGC
extends java.lang.Thread

Used to enhance performance by delaying the removal of unreferenced RwLockHolder objects managed by the ReadWriteLockManager.

Author:
asmuts

Field Summary
private  boolean clean
           
private  java.util.Hashtable ht
           
private static long IDLE_PERIOD
           
private static org.apache.commons.logging.Log log
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) RwLockGC(java.util.Hashtable ht)
          Constructor for the RwLockGC object
 
Method Summary
private  void dirty()
          Sets the "clean" flag to false in a critial section.
(package private)  void notifyGarbage()
          Notifies the garbage collection that there is garbage available, and kicks off the garbage collection process.
 void run()
          Main processing method for the RwLockGC object
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

ht

private final java.util.Hashtable ht

IDLE_PERIOD

private static final long IDLE_PERIOD
See Also:
Constant Field Values

clean

private boolean clean
Constructor Detail

RwLockGC

RwLockGC(java.util.Hashtable ht)
Constructor for the RwLockGC object

Parameters:
ht -
Method Detail

notifyGarbage

void notifyGarbage()
Notifies the garbage collection that there is garbage available, and kicks off the garbage collection process.


run

public void run()
Main processing method for the RwLockGC object


dirty

private void dirty()
Sets the "clean" flag to false in a critial section.