javax.util.jcache
Class CacheAttributes

java.lang.Object
  extended by javax.util.jcache.CacheAttributes
All Implemented Interfaces:
Cloneable

Deprecated. removed with no replacement.

public class CacheAttributes
extends Object
implements Cloneable

An administrative interface to the cache. Invalid parameters to the methods of this class will be silently ignored.

Author:
Frank Karlstrøm

Method Summary
 void addCacheAddr(InetAddress address, int port)
          Deprecated. is used to specify the network address and port to be used by the cache messaging system.
 CacheAttributes copy()
          Deprecated. Returns a copy of these CacheAttributes.
 Enumeration getCacheAddr()
          Deprecated. returns an Enumeration of Strings representing the address for all the cache addresses configured.
 int getCleanInterval()
          Deprecated. Returns the cleanInterval.
static CacheAttributes getDefaultCacheAttributes()
          Deprecated.  
 String getDiskPath()
          Deprecated. gets the attribute indicating the root location for the disk cache.
 int getDiskSize()
          Deprecated. Returns the maximum size for the disk cache.
 CacheLogger getLogger()
          Deprecated. returns the cachelogger for this cache.
 int getMaxObjects()
          Deprecated. Returns the maximum number of Objects.
 int getMemoryCacheSize()
          Deprecated. Gets the attribute to indicate the maximum size of the memory cache.
 boolean isDistributed()
          Deprecated. returns an boolean indication wether this cache is distributed or not.
 void registerCache(CacheImpl cache)
          Deprecated.  
 void setCleanInterval(int seconds)
          Deprecated. sets the attribute indicating how often the cacha should be checked for objects invalidated by "time to live" or "idle time" attributes.
 void setDefaultLogFileName(String pDefaultLogFileName)
          Deprecated. sets the log file name for the DefaultCacheLogger.
 void setDiskCacheSize(int size)
          Deprecated. sets the attribute to indicate the maximum size of the disk cache.
 void setDiskPath(String path)
          Deprecated. sets the attribute indicating the root location for the disk cache.
 void setLocal()
          Deprecated. sets the attribute to indicate the cache is local.
 void setLogger(CacheLogger logger)
          Deprecated. sets the logger object wich will be used to log cache messages.
 void setMaxObjects(int size)
          Deprecated. is used to set the attribute to determine the maximum number of objects allowed in the memory cache.
 void setMemoryCacheSize(int size)
          Deprecated. sets the attribute to indicate the maximum size of the memory cache.
 String toString()
          Deprecated. Returns a string representation of these CacheAttributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

registerCache

public void registerCache(CacheImpl cache)
Deprecated. 

setLocal

public void setLocal()
Deprecated. 
sets the attribute to indicate the cache is local. Invalidations and updates will not be propagated to other caches in the system.


setMaxObjects

public void setMaxObjects(int size)
Deprecated. 
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 one not set is ignored. if both are set, both are used to determine the capacity of the cache, i.e. object will be reomved from the cache if either limit is reached.

Parameters:
size - the maximum number of objects in the cache.

setMemoryCacheSize

public void setMemoryCacheSize(int size)
Deprecated. 
sets the attribute to indicate the maximum size of the memory cache. If the max number of objects in the cache are 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 reomved from the cache if either limit is reached.

Parameters:
size - the maximum size of the memory cache in megabytes.

setDiskCacheSize

public void setDiskCacheSize(int size)
Deprecated. 
sets the attribute to indicate the maximum size of the disk cache.

Parameters:
size - the maximum size of the disk cache in megabytes.

setDiskPath

public void setDiskPath(String path)
Deprecated. 
sets the attribute indicating the root location for the disk cache.

Parameters:
path - the path to the root location for the disk cache.

setLogger

public void setLogger(CacheLogger logger)
Deprecated. 
sets the logger object wich will be used to log cache messages.

Parameters:
logger - the logger wich will log cache messages.

setDefaultLogFileName

public void setDefaultLogFileName(String pDefaultLogFileName)
Deprecated. 
sets the log file name for the DefaultCacheLogger. If the default logger is being used (a new CacheLogger has not been implemented and set), all cache log messages will be written to the file "jcache.log" wich is created in the directory where the server process is started up. This method changes the location and name of the file to be used.

Parameters:
pDefaultLogFileName - is a full path name for the log file.

setCleanInterval

public void setCleanInterval(int seconds)
Deprecated. 
sets the attribute indicating how often the cacha should be checked for objects invalidated by "time to live" or "idle time" attributes.

Parameters:
seconds - how many seconds between each check.

addCacheAddr

public void addCacheAddr(InetAddress address,
                         int port)
Deprecated. 
is used to specify the network address and port to be used by the cache messaging system. At least one address is required by the cache to allow discovery when a process using the cache is first brought online. If no address is specified, localhost with a default port is used. If the system of caches is across multiple nodes, it is best to have an address specified for each node to protect against unavailable nodes. The implementation of this method will do nothing, as the caches auto-discover themselves. As long as a cache is marked as distributed, it will automatically register itselves with the other cache nodes.

Parameters:
address - the address of the remote cache.
port - the port of the remote cache.

getCacheAddr

public Enumeration getCacheAddr()
Deprecated. 
returns an Enumeration of Strings representing the address for all the cache addresses configured. if no address were configured, the default value is returned. The address is in the form ipaddress:port

Returns:
an Enumeration of Strings representing the address for all the cache addresses configured.

getLogger

public CacheLogger getLogger()
Deprecated. 
returns the cachelogger for this cache.

Returns:
the cachelogger for this cache.

isDistributed

public boolean isDistributed()
Deprecated. 
returns an boolean indication wether this cache is distributed or not.

Returns:
an boolean indication wether this cache is distributed or not.

getDiskPath

public String getDiskPath()
Deprecated. 
gets the attribute indicating the root location for the disk cache.

Returns:
the attribute indicating the root location for the disk cache.

toString

public String toString()
Deprecated. 
Returns a string representation of these CacheAttributes.

Overrides:
toString in class Object
Returns:
a string representation of these CacheAttributes.

getMemoryCacheSize

public int getMemoryCacheSize()
Deprecated. 
Gets the attribute to indicate the maximum size of the memory cache.

Returns:
the attribute to indicate the maximum size of the memory cache.

copy

public CacheAttributes copy()
Deprecated. 
Returns a copy of these CacheAttributes.

Returns:
a copy of these CacheAttributes.

getCleanInterval

public int getCleanInterval()
Deprecated. 
Returns the cleanInterval.

Returns:
an int representing the cleanInterval.

getDefaultCacheAttributes

public static CacheAttributes getDefaultCacheAttributes()
Deprecated. 

getMaxObjects

public final int getMaxObjects()
Deprecated. 
Returns the maximum number of Objects.

Returns:
Returns the maximum number of Objects.

getDiskSize

public final int getDiskSize()
Deprecated. 
Returns the maximum size for the disk cache.

Returns:
the maximum size for the disk cache.


Copyright © 2002-2009 Hosted by SourceForge. All Rights Reserved.