oracle.ias.cache
Class CacheAttributes

java.lang.Object
  |
  +--oracle.ias.cache.CacheAttributes

public class CacheAttributes
extends java.lang.Object

CacheAttributes has the Cache configuration information. It is a structure which is passed to Cache.init(CacheAttributes) to do the system wide configuration. All the fileds are public and user can access the fields directly. Two constructors and a set of convenient methods are provided.

Since:
2.0.0
See Also:
Cache.init(CacheAttributes)

Field Summary
TypeField
 int cleanInterval
          Number of seconds between cache cleanings
 boolean cleanIntervalSet
           
 java.lang.String diskPath
          Absolute path to the the root of the disk cache directory
 int diskSize
          The size of the disk cache in megabytes
 boolean diskSizeSet
           
 boolean distribute
          Indicates the cache is distributed, updates and invalidates are propagated to other caches in the system
 java.lang.String logFileName
          Log file name for the default logger implementation.
 java.lang.String logger
          The logger object which is used to log cache messages.
 int logSeverity
          Log severity, see CacheLogger for details
 boolean logSeveritySet
           
 int maxObjects
          Maximum number of in-memory objects in the cache
 boolean maxObjectsSet
          indicates attribute has been reset
 int maxSize
          The size of the memory cache in megabytes
 boolean maxSizeSet
           
 int pingInterval
          Number of seconds between cache death detection(pinging)
 java.lang.String version
          Version of the cache software
 
Constructor Summary
CacheAttributes()
          Constructs a default CacheAttributes which will set all the values to default.
 
Method Summary
TypeMethod
 void addCacheAddr(java.net.InetAddress ipAddr, int port)
          adds a new ipAddr/port to the list of cache addresses
 void addCacheAddr(java.net.InetAddress ipAddr, int port, boolean replace)
          adds a new ipAddr/port to the list of cache addresses
 java.lang.String getAddrListString()
          Returns the list of cache addresses in a formatted string, if the list is null, set to the default
 java.util.Enumeration getCacheAddrs()
          gets an enumeration of the list of cache addresses, if the list is null the enumerator will return the default address.
 void setCleanInterval(int pCleanInterval)
          sets number of seconds between cache cleanings
 void setDiskPath(java.lang.String pDiskPath)
          sets absolute path to the root of the disk cache directory.
 void setDiskSize(int pDiskSize)
          sets the disk cache size
 void setDistribute(boolean pDistribute)
          sets the distribute flag to indicate if the cache is local to the process of not
 void setLogFileName(java.lang.String pLogFileName)
          sets the log file name for the DefaultCacheLogger.
 void setLogger(java.lang.String pLogger)
          sets the logger object which will be used to log cache messages.
 void setLogSeverity(int severity)
          sets the log severity which determines which log messages are published to the log
 void setMaxObjects(int pMaxObjects)
          sets the maximum number of in-memory objects in the cache.
 void setMaxSize(int pMaxSize)
          sets the maximum number of bytes available to the in-memory cache
 void setPingInterval(int pPingInterval)
          sets number of seconds between cache death detection
 java.lang.String toString()
          converts this object into a formatted string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

distribute

public boolean distribute
Indicates the cache is distributed, updates and invalidates are propagated to other caches in the system

version

public java.lang.String version
Version of the cache software

maxObjects

public int maxObjects
Maximum number of in-memory objects in the cache

maxSize

public int maxSize
The size of the memory cache in megabytes

diskSize

public int diskSize
The size of the disk cache in megabytes

diskPath

public java.lang.String diskPath
Absolute path to the the root of the disk cache directory

cleanInterval

public int cleanInterval
Number of seconds between cache cleanings

pingInterval

public int pingInterval
Number of seconds between cache death detection(pinging)

logger

public java.lang.String logger
The logger object which is used to log cache messages.

logFileName

public java.lang.String logFileName
Log file name for the default logger implementation.

logSeverity

public int logSeverity
Log severity, see CacheLogger for details

maxObjectsSet

public boolean maxObjectsSet
indicates attribute has been reset

maxSizeSet

public boolean maxSizeSet

diskSizeSet

public boolean diskSizeSet

logSeveritySet

public boolean logSeveritySet

cleanIntervalSet

public boolean cleanIntervalSet
Constructor Detail

CacheAttributes

public CacheAttributes()
                throws CacheException
Constructs a default CacheAttributes which will set all the values to default. The default values are as following:
Since:
2.0.0
Method Detail

setDistribute

public void setDistribute(boolean pDistribute)
sets the distribute flag to indicate if the cache is local to the process of not

Parameters:
pDistribute - is true, means the cache is part of the distributed cache otherwise, the cache is local to the process.
Since:
2.0.0

setMaxObjects

public void setMaxObjects(int pMaxObjects)
sets the maximum number of in-memory objects in the cache.

Parameters:
pMaxObjects - maximum number of in-memory objects in the cache
Since:
2.0.0

setMaxSize

public void setMaxSize(int pMaxSize)
sets the maximum number of bytes available to the in-memory cache

Parameters:
pMaxObjects - maximum number of bytes available to the cache
Since:
2.1.1

setDiskSize

public void setDiskSize(int pDiskSize)
sets the disk cache size

Parameters:
pDiskSize - the disk cache size in megabytes
Since:
2.0.0

setDiskPath

public void setDiskPath(java.lang.String pDiskPath)
sets absolute path to the root of the disk cache directory.

Parameters:
pDiskPath - the absolute path to the root of the disk cache directory
Since:
2.0.0

setCleanInterval

public void setCleanInterval(int pCleanInterval)
sets number of seconds between cache cleanings

Parameters:
pCleanInterval - number of seconds between cache cleanings
Since:
2.0.0

setPingInterval

public void setPingInterval(int pPingInterval)
sets number of seconds between cache death detection

Parameters:
pPingInterval - number of seconds between cache death detection
Since:
2.0.0

setLogger

public void setLogger(java.lang.String pLogger)
sets the logger object which will be used to log cache messages.

Parameters:
pLogger - an object extends CacheLogger
Since:
2.0.0

setLogSeverity

public void setLogSeverity(int severity)
sets the log severity which determines which log messages are published to the log

Parameters:
severity - log severity
Since:
2.1.1

setLogFileName

public void setLogFileName(java.lang.String pLogFileName)
sets the log file name for the DefaultCacheLogger.

Parameters:
pLogFileName - the log file name for the DefaultCacheLogger.
Since:
2.0.0

addCacheAddr

public void addCacheAddr(java.net.InetAddress ipAddr,
                         int port)
adds a new ipAddr/port to the list of cache addresses

Parameters:
ipAddr - the inet address
port - the port
Since:
2.0.0

addCacheAddr

public void addCacheAddr(java.net.InetAddress ipAddr,
                         int port,
                         boolean replace)
adds a new ipAddr/port to the list of cache addresses

Parameters:
ipAddr - the inet address
port - the port
replace - if the IP address already exists. The previous address would be discarded.
Since:
2.0.0

getCacheAddrs

public java.util.Enumeration getCacheAddrs()
gets an enumeration of the list of cache addresses, if the list is null the enumerator will return the default address.

Since:
2.0.0

getAddrListString

public java.lang.String getAddrListString()
Returns the list of cache addresses in a formatted string, if the list is null, set to the default

Since:
2.0.1

toString

public java.lang.String toString()
converts this object into a formatted string

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.
Since:
2.0.0