org.apache.jcs.engine.behavior
Interface ICompositeCacheAttributes

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CompositeCacheAttributes

public interface ICompositeCacheAttributes
extends java.io.Serializable

Description of the Interface


Method Summary
 ICompositeCacheAttributes copy()
          Description of the Method
 java.lang.String getCacheName()
          Gets the cacheName attribute of the ICompositeCacheAttributes object
 long getMaxMemoryIdleTimeSeconds()
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 int getMaxObjects()
          Gets the maxObjects attribute of the ICompositeCacheAttributes object
 int getMaxSpoolPerRun()
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 java.lang.String getMemoryCacheName()
          Gets the memoryCacheName attribute of the ICompositeCacheAttributes object
 long getShrinkerIntervalSeconds()
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 boolean getUseDisk()
          Gets the useDisk attribute of the ICompositeCacheAttributes object
 boolean getUseLateral()
          Gets the useLateral attribute of the ICompositeCacheAttributes object
 boolean getUseMemoryShrinker()
          Whether the memory cache should perform background memory shrinkage.
 boolean getUseRemote()
          returns whether the cache is remote enabled
 void setCacheName(java.lang.String s)
          Sets the name of the cache, referenced by the appropriate manager.
 void setMaxMemoryIdleTimeSeconds(long seconds)
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 void setMaxObjects(int size)
          SetMaxObjects is used to set the attribute to determine the maximum number of objects allowed in the memory cache.
 void setMaxSpoolPerRun(int maxSpoolPerRun)
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 void setMemoryCacheName(java.lang.String s)
          Sets the name of the MemoryCache, referenced by the appropriate manager.
 void setShrinkerIntervalSeconds(long seconds)
          If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.
 void setUseDisk(boolean useDisk)
          Sets the useDisk attribute of the ICompositeCacheAttributes object
 void setUseLateral(boolean d)
          set whether the cache should use a lateral cache
 void setUseMemoryShrinker(boolean useShrinker)
          Whether the memory cache should perform background memory shrinkage.
 void setUseRemote(boolean isRemote)
          Sets whether the cache is remote enabled
 

Method Detail

setMaxObjects

public void setMaxObjects(int size)
SetMaxObjects is used to set the attribute to determine the maximum number of objects allowed in the memory cache. If the max number of objects or the cache size is set, the default for the one not set is ignored. If both are set, both are used to determine the capacity of the cache, i.e., object will be removed from the cache if either limit is reached. TODO: move to MemoryCache config file.

Parameters:
size - The new maxObjects value

getMaxObjects

public int getMaxObjects()
Gets the maxObjects attribute of the ICompositeCacheAttributes object

Returns:
The maxObjects value

setUseDisk

public void setUseDisk(boolean useDisk)
Sets the useDisk attribute of the ICompositeCacheAttributes object

Parameters:
useDisk - The new useDisk value

getUseDisk

public boolean getUseDisk()
Gets the useDisk attribute of the ICompositeCacheAttributes object

Returns:
The useDisk value

setUseLateral

public void setUseLateral(boolean d)
set whether the cache should use a lateral cache

Parameters:
d - The new useLateral value

getUseLateral

public boolean getUseLateral()
Gets the useLateral attribute of the ICompositeCacheAttributes object

Returns:
The useLateral value

setUseRemote

public void setUseRemote(boolean isRemote)
Sets whether the cache is remote enabled

Parameters:
isRemote - The new useRemote value

getUseRemote

public boolean getUseRemote()
returns whether the cache is remote enabled

Returns:
The useRemote value

setCacheName

public void setCacheName(java.lang.String s)
Sets the name of the cache, referenced by the appropriate manager.

Parameters:
s - The new cacheName value

getCacheName

public java.lang.String getCacheName()
Gets the cacheName attribute of the ICompositeCacheAttributes object

Returns:
The cacheName value

setMemoryCacheName

public void setMemoryCacheName(java.lang.String s)
Sets the name of the MemoryCache, referenced by the appropriate manager. TODO: create a separate memory cache attribute class.

Parameters:
s - The new memoryCacheName value

getMemoryCacheName

public java.lang.String getMemoryCacheName()
Gets the memoryCacheName attribute of the ICompositeCacheAttributes object

Returns:
The memoryCacheName value

setUseMemoryShrinker

public void setUseMemoryShrinker(boolean useShrinker)
Whether the memory cache should perform background memory shrinkage.

Parameters:
useShrinker - The new UseMemoryShrinker value

getUseMemoryShrinker

public boolean getUseMemoryShrinker()
Whether the memory cache should perform background memory shrinkage.

Returns:
The UseMemoryShrinker value

setMaxMemoryIdleTimeSeconds

public void setMaxMemoryIdleTimeSeconds(long seconds)
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.

Parameters:
seconds - The new MaxMemoryIdleTimeSeconds value

getMaxMemoryIdleTimeSeconds

public long getMaxMemoryIdleTimeSeconds()
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.

Returns:
The MaxMemoryIdleTimeSeconds value

setShrinkerIntervalSeconds

public void setShrinkerIntervalSeconds(long seconds)
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This sets the shrinker interval.

Parameters:
seconds - The new ShrinkerIntervalSeconds value

getShrinkerIntervalSeconds

public long getShrinkerIntervalSeconds()
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This gets the shrinker interval.

Returns:
The ShrinkerIntervalSeconds value

setMaxSpoolPerRun

public void setMaxSpoolPerRun(int maxSpoolPerRun)
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This sets the maximum number of items to spool per run.


getMaxSpoolPerRun

public int getMaxSpoolPerRun()
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This gets the maximum number of items to spool per run.

Returns:
The maxSpoolPerRun value

copy

public ICompositeCacheAttributes copy()
Description of the Method

Returns:


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.