Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.w3c.www.protocol.http.cache
Class SimpleCacheSweeper

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

public class SimpleCacheSweeper
extends CacheSweeper

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

### state

    protected int state

Constructor Detail

### SimpleCacheSweeper

    public SimpleCacheSweeper()

Method Detail

### signal

    public void signal()

  Used to trigger a signal
  Overrides:
    signal in class CacheSweeper

### waitSignal

    public void waitSignal()

### run

    public void run()

  Overrides:
    run in class java.lang.Thread

### garbageCollect

    public void garbageCollect()

  Run the garbage collector.

### setState

    protected void setState(int state)

  change the state of the Sweeper
  Overrides:
    setState in class CacheSweeper
  Parameters:
    `an` - integer, setting the new cache state

### collectStored

    protected void collectStored(CacheGeneration generation)

  collect the still stored resources
  Overrides:
    collectStored in class CacheSweeper
  Parameters:
    `generation,` - the CacheGeneration to clean

### collectStored

    protected void collectStored()

  collect the still stored resources in the whole cache It will NOT block the cache during the process
  Overrides:
    collectStored in class CacheSweeper

### collectCached

    protected long collectCached(CacheGeneration generation,
                                 long bytes,
                                 boolean check)

  collect the existing resources
  Overrides:
    collectCached in class CacheSweeper
  Parameters:
    `generation,` - the CacheGeneration to clean
    `bytes,` - a long. The number of bytes to collect
    `check,` - a boolean. If true, then only the stale resources will be removed

### collectCached

    protected long collectCached(long bytes,
                                 boolean check)

  collect the existing resources
  Overrides:
    collectCached in class CacheSweeper
  Parameters:
    `bytes,` - a long. The number of bytes to collect
    `check,` - a boolean. If true, then only the stale resources will be removed
  Returns:
    a long, the number of collected bytes

### initialize

    public void initialize(CacheFilter filter)

  initialize the sweeper
  Overrides:
    initialize in class CacheSweeper

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD