    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

##

basegen
byteused
curgen
dirid
filter
generation
GENERATIONS_HISTORY_SIZE
gensizes
subdirs

##

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

##

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

##

GENERATIONS_HISTORY_SIZE

     protected static final int GENERATIONS_HISTORY_SIZE

dirid

     protected int dirid

byteused

     protected int byteused

generation

     protected int generation

gensizes

     protected int gensizes[]

basegen

     protected int basegen

curgen

     protected int curgen

filter

     protected CacheFilter filter

subdirs

     protected Subdirectory subdirs[]

##

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.

##

getCacheUsed

     public final synchronized int getCacheUsed()

getGeneration

     public final synchronized int getGeneration()

setGeneration

     public final synchronized void setGeneration(int g)

getBaseGeneration

     public final synchronized int getBaseGeneration()

setBaseGeneration

     public final synchronized void setBaseGeneration(int newbase)

getGenerationsSize

     public final synchronized int[] getGenerationsSize()

setGenerationsSize

     public final synchronized void setGenerationsSize(int sizes[])

getNextFile

     protected File getNextFile()

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.

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.

getCurrentGenerationSize

     protected synchronized int getCurrentGenerationSize()

  Get current generation size.

  Returns:
    The size in bytes of the current generation.

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.

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.

print

     public void print(PrintStream out)

    All Packages  Class Hierarchy  This Package  Previous  Next  Index