Class w3c.www.protocol.http.cache.CacheState
All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.www.protocol.http.cache.CacheState

public class CacheState
extends Resource

Variable Index

 o ATTR_BASE_GENERATION
Attribute index - The base generation we are using.
 o ATTR_CACHE_USED
Attribute index - The number of bytes of cache disk used.
 o ATTR_COUNTER
Attribute index - The counter, to use for file naming.
 o ATTR_GENERATION
Attribute index - The cache sweeper current generation.
 o ATTR_GENERATIONS_SIZE
Attribute index - The current generation sizes.
 o GENERATIONS_HISTORY_SIZE

Constructor Index

 o CacheState()

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()
Get the current collection generation number.
 o getGenerationsSize()
 o getNext()
 o initialize(Object[])
Initialization method for attribute holders.
 o print(PrintStream)
Debugging purposes only, print this attribute holder.
 o setBaseGeneration(int)
 o setGenerationsSize(int[])
 o setNextGeneration()
Get the next collector generation number, and update state.
 o shiftGenerations(int)
 o updateCacheSpaceCounter(int)
Update cache space counter.
 o updateGenerationSize(int, int)
Update generations size

Variables

 o GENERATIONS_HISTORY_SIZE
  protected final static int GENERATIONS_HISTORY_SIZE
 o ATTR_COUNTER
  protected static int ATTR_COUNTER
Attribute index - The counter, to use for file naming.
 o ATTR_CACHE_USED
  protected static int ATTR_CACHE_USED
Attribute index - The number of bytes of cache disk used.
 o ATTR_GENERATION
  protected static int ATTR_GENERATION
Attribute index - The cache sweeper current generation.
 o ATTR_GENERATIONS_SIZE
  protected static int ATTR_GENERATIONS_SIZE
Attribute index - The current generation sizes.
 o ATTR_BASE_GENERATION
  protected static int ATTR_BASE_GENERATION
Attribute index - The base generation we are using.

Constructors

 o CacheState
  public CacheState()

Methods

 o getNext
  public synchronized int getNext()
 o getCacheUsed
  public synchronized int getCacheUsed()
 o getGeneration
  public int getGeneration()
Get the current collection generation number.
Returns:
An integer, giving the current collector generation.
 o getBaseGeneration
  public int getBaseGeneration()
 o setBaseGeneration
  public void setBaseGeneration(int newbase)
 o getGenerationsSize
  public int[] getGenerationsSize()
 o setGenerationsSize
  public void setGenerationsSize(int sizes[])
 o shiftGenerations
  public synchronized void shiftGenerations(int g)
 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)
Debugging purposes only, print this attribute holder.
Overrides:
print in class AttributeHolder
 o initialize
  public void initialize(Object values[])
Initialization method for attribute holders.
Overrides:
initialize in class AttributeHolder

All Packages  Class Hierarchy  This Package  Previous  Next  Index