|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.w3c.www.protocol.http.cache.CacheSweeper | +--org.w3c.www.protocol.http.cache.SimpleCacheSweeper
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,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
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 |
protected int state
Constructor Detail |
public SimpleCacheSweeper()
Method Detail |
public void signal()
public void waitSignal()
public void run()
public void garbageCollect()
protected void setState(int state)
an
- integer, setting the new cache stateprotected void collectStored(CacheGeneration generation)
generation,
- the CacheGeneration to cleanprotected void collectStored()
protected long collectCached(CacheGeneration generation, long bytes, boolean check)
generation,
- the CacheGeneration to cleanbytes,
- a long. The number of bytes to collectcheck,
- a boolean. If true, then only the stale resources
will be removedprotected long collectCached(long bytes, boolean check)
bytes,
- a long. The number of bytes to collectcheck,
- a boolean. If true, then only the stale resources
will be removedpublic void initialize(CacheFilter filter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |