All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.protocol.http.cache.CacheSweeper

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----w3c.www.protocol.http.cache.CacheSweeper

public class CacheSweeper
extends Thread

Constructor Index

 o CacheSweeper(CacheFilter)

Method Index

 o checkInvalid(CachedResource, int)
Should the given resource stay in the cache now.
 o garbageCollect()
Run the garbage collector.
 o run()
 o signal()
 o updateGeneration(CachedResource, int, int)
Move the given resource from one generation to another.
 o waitSignal()

Constructors

 o CacheSweeper
 public CacheSweeper(CacheFilter filter)

Methods

 o signal
 public synchronized void signal()
 o waitSignal
 public synchronized void waitSignal()
 o checkInvalid
 public boolean checkInvalid(CachedResource r,
                             int mingen)
Should the given resource stay in the cache now. This method just checks against generation numbers to decide wether the resource should stay or not. It's likely that this method will improve over time (to handle disconnected caching, etc).

Parameters:
r - The resource to check.
mingen - The recommended generation for that resource to stay in.
Returns:
A boolean, true if the resource should stay, false if it should leave.
 o updateGeneration
 protected void updateGeneration(CachedResource resource,
                                 int from,
                                 int to)
Move the given resource from one generation to another.

Parameters:
resource - The cached resource whose generation is about to change.
from - The from generation.
to - The to generation.
 o garbageCollect
 public void garbageCollect()
Run the garbage collector.

 o run
 public void run()
Overrides:
run in class Thread

All Packages  Class Hierarchy  This Package  Previous  Next  Index