All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.protocol.http.cache.CacheState

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

public class CacheState
extends Object

Variable Index

 o basegen
 o byteused
 o curgen
 o dirid
 o filter
 o generation
 o GENERATIONS_HISTORY_SIZE
 o gensizes
 o subdirs

Constructor Index

 o CacheState(CacheFilter, jdbmResourceStore)
Rebuild the cache state out of the given store of cached entries.

Method Index

 o computeCollectGeneration(int)
Compute generation number to sweep, given amount of data to collect.
 o getBaseGeneration()
 o getCacheUsed()
 o getCurrentGenerationSize()
Get current generation size.
 o getGeneration()
 o getGenerationsSize()
 o getNextFile()
 o print(PrintStream)
 o setBaseGeneration(int)
 o setGeneration(int)
 o setGenerationsSize(int[])
 o setNextGeneration()
Get the next collector generation number, and update state.
 o updateCacheSpaceCounter(int)
Update cache space counter.
 o updateGenerationSize(int, int)
Update generations size

Variables

 o GENERATIONS_HISTORY_SIZE
 protected static final int GENERATIONS_HISTORY_SIZE
 o dirid
 protected int dirid
 o byteused
 protected int byteused
 o generation
 protected int generation
 o gensizes
 protected int gensizes[]
 o basegen
 protected int basegen
 o curgen
 protected int curgen
 o filter
 protected CacheFilter filter
 o subdirs
 protected Subdirectory subdirs[]

Constructors

 o CacheState
 public CacheState(CacheFilter filter,
                   jdbmResourceStore store)
Rebuild the cache state out of the given store of cached entries.

Parameters:
store - The resource store for cached entries.

Methods

 o getCacheUsed
 public final synchronized int getCacheUsed()
 o getGeneration
 public final synchronized int getGeneration()
 o setGeneration
 public final synchronized void setGeneration(int g)
 o getBaseGeneration
 public final synchronized int getBaseGeneration()
 o setBaseGeneration
 public final synchronized void setBaseGeneration(int newbase)
 o getGenerationsSize
 public final synchronized int[] getGenerationsSize()
 o setGenerationsSize
 public final synchronized void setGenerationsSize(int sizes[])
 o getNextFile
 protected File getNextFile()
 o setNextGeneration
 public synchronized int setNextGeneration()
Get the next collector generation number, and update state.

Returns:
The next (which will be current when the method returns) collector generation.
 o updateGenerationSize
 protected synchronized void updateGenerationSize(int generation,
                                                  int size)
Update generations size

Parameters:
generation - The generation whose size is changing.
size - The delta with previous size.
 o getCurrentGenerationSize
 protected synchronized int getCurrentGenerationSize()
Get current generation size.

Returns:
The size in bytes of the current generation.
 o computeCollectGeneration
 protected synchronized int computeCollectGeneration(int size)
Compute generation number to sweep, given amount of data to collect.

Parameters:
size - The size of data to be collected.
 o updateCacheSpaceCounter
 public synchronized int updateCacheSpaceCounter(int size)
Update cache space counter.

Parameters:
size - The number of bytes used (if positif), or the number of bytes freed (if negative).
Returns:
The total number of bytes used.
 o print
 public void print(PrintStream out)

All Packages  Class Hierarchy  This Package  Previous  Next  Index