: 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

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

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

Direct Known Subclasses:
  SimpleCacheSweeper

public abstract class CacheSweeper
extends java.lang.Thread

Field Summary
`protected static int` | `STATE_CLEAN_GENERATIONS`
`protected static int` | `STATE_CLEAN_STORED`
`protected static int` | `STATE_FORCE_CLEAN_GENERATIONS`
`protected static int` | `STATE_FORCE_CLEAN_STORED`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`CacheSweeper()`

Method Summary
`protected abstract long` | `collectCached(CacheGeneration generation, long bytes, boolean check)` collect the existing resources
`protected abstract long` | `collectCached(long bytes, boolean check)` collect the existing resources
`protected abstract void` | `collectStored()` collect the still stored resources (disk) in the whole cache
`protected abstract void` | `collectStored(CacheGeneration generation)` collect the still stored resources (disk)
`abstract void` | `initialize(CacheFilter filter)` initialize the sweeper
`protected abstract void` | `setState(int state)` change the state of the Sweeper
`abstract void` | `signal()` Used to trigger a signal

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, run, 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_CLEAN_STORED

    protected static final int STATE_CLEAN_STORED

### STATE_FORCE_CLEAN_STORED

    protected static final int STATE_FORCE_CLEAN_STORED

### STATE_CLEAN_GENERATIONS

    protected static final int STATE_CLEAN_GENERATIONS

### STATE_FORCE_CLEAN_GENERATIONS

    protected static final int STATE_FORCE_CLEAN_GENERATIONS

Constructor Detail

### CacheSweeper

    public CacheSweeper()

Method Detail

### signal

    public abstract void signal()

  Used to trigger a signal

### setState

    protected abstract void setState(int state)

  change the state of the Sweeper
  Parameters:
    `an` - integer, setting the new cache state

### collectStored

    protected abstract void collectStored(CacheGeneration generation)

  collect the still stored resources (disk)
  Parameters:
    `generation,` - the CacheGeneration to clean

### collectStored

    protected abstract void collectStored()

  collect the still stored resources (disk) in the whole cache

### collectCached

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

  collect the existing resources
  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
  Returns:
    a long, the number of collected bytes

### collectCached

    protected abstract long collectCached(long bytes,
                                          boolean check)

  collect the existing resources
  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 abstract void initialize(CacheFilter filter)

  initialize the sweeper

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