Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.cache
Class AbstractCache

java.lang.Object
  extended by com.sciapp.table.cache.AbstractCache
All Implemented Interfaces:
Cache
Direct Known Subclasses:
AbstractDatabaseTreeTableModel.DefaultTreeTableAggregateRowCache, AbstractGroupCache, AbstractTableCache, AbstractTreeTableCache

public abstract class AbstractCache
extends Object
implements Cache

AbstractCache defines variables that determine the cache's store behaviour\ when caching values.


Field Summary
protected  int chunkSize
          the chunk size
static int DEFAULT_CHUNK_SIZE
          defines the default chunck size
static int DEFAULT_MAX_CACHE_SIZE
          defines the default maximum cache size
protected  int maximumCacheSize
          the maximum cache size
 
Constructor Summary
AbstractCache()
          Creates an AbstractCache with a default chunk size and a default maximum cache size.
AbstractCache(int chunkSize, int maximumCacheSize)
          Creates an AbstractCache with a chunk size and maximum cache size determined by chunkSize and maximumCacheSize.
 
Method Summary
 void setChunkSize(int chunkSize)
          Sets the current chunk size.
 void setMaximumCacheSize(int maximumCacheSize)
          Sets the current maximum cache size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sciapp.table.cache.Cache
get, isValueCached, put, remove, removeAll
 

Field Detail

maximumCacheSize

protected int maximumCacheSize
the maximum cache size


chunkSize

protected int chunkSize
the chunk size


DEFAULT_MAX_CACHE_SIZE

public static final int DEFAULT_MAX_CACHE_SIZE
defines the default maximum cache size

See Also:
Constant Field Values

DEFAULT_CHUNK_SIZE

public static final int DEFAULT_CHUNK_SIZE
defines the default chunck size

See Also:
Constant Field Values
Constructor Detail

AbstractCache

public AbstractCache()
Creates an AbstractCache with a default chunk size and a default maximum cache size.


AbstractCache

public AbstractCache(int chunkSize,
                     int maximumCacheSize)
Creates an AbstractCache with a chunk size and maximum cache size determined by chunkSize and maximumCacheSize.

Method Detail

setChunkSize

public void setChunkSize(int chunkSize)
Sets the current chunk size.

Parameters:
chunkSize - the cuunk size to assign

setMaximumCacheSize

public void setMaximumCacheSize(int maximumCacheSize)
Sets the current maximum cache size.

Parameters:
maximumCacheSize - the maximum cache size to assign

Copyright © 2005 Scientific Applications. All Rights Reserved.