|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.w3c.www.protocol.http.cache.CacheSweeper
org.w3c.www.protocol.http.cache.SimpleCacheSweeper
public class SimpleCacheSweeper
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected int |
state
|
| Fields inherited from class org.w3c.www.protocol.http.cache.CacheSweeper |
|---|
STATE_CLEAN_GENERATIONS, STATE_CLEAN_STORED, STATE_FORCE_CLEAN_GENERATIONS, STATE_FORCE_CLEAN_STORED |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SimpleCacheSweeper()
|
|
| Method Summary | |
|---|---|
protected long |
collectCached(CacheGeneration generation,
long bytes,
boolean check)
collect the existing resources |
protected long |
collectCached(long bytes,
boolean check)
collect the existing resources |
protected void |
collectStored()
collect the still stored resources in the whole cache It will NOT block the cache during the process |
protected void |
collectStored(CacheGeneration generation)
collect the still stored resources |
void |
garbageCollect()
Run the garbage collector. |
void |
initialize(CacheFilter filter)
initialize the sweeper |
void |
run()
|
protected void |
setState(int state)
change the state of the Sweeper |
void |
signal()
Used to trigger a signal |
void |
waitSignal()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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 |
|---|
protected int state
| Constructor Detail |
|---|
public SimpleCacheSweeper()
| Method Detail |
|---|
public void signal()
signal in class CacheSweeperpublic void waitSignal()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void garbageCollect()
protected void setState(int state)
setState in class CacheSweeperan - integer, setting the new cache stateprotected void collectStored(CacheGeneration generation)
collectStored in class CacheSweepergeneration, - the CacheGeneration to cleanprotected void collectStored()
collectStored in class CacheSweeper
protected long collectCached(CacheGeneration generation,
long bytes,
boolean check)
collectCached in class CacheSweepergeneration, - the CacheGeneration to cleanbytes, - a long. The number of bytes to collectcheck, - a boolean. If true, then only the stale resources
will be removed
protected long collectCached(long bytes,
boolean check)
collectCached in class CacheSweeperbytes, - a long. The number of bytes to collectcheck, - a boolean. If true, then only the stale resources
will be removed
public void initialize(CacheFilter filter)
initialize in class CacheSweeper
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||