Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Java Object Cache API Reference 10g Release 3 (10.1.3) B25712-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ias.cache
Class CacheAttributes

`java.lang.Object
oracle.ias.cache.NamedCacheAttributes
oracle.ias.cache.CacheAttributes`

All Implemented Interfaces:
  java.lang.Cloneable

public class CacheAttributes
extends oracle.ias.cache.NamedCacheAttributes

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
`boolean` | `autoInit` Whether cache is auto init
`java.lang.String` | `cacheName` The name of the cache
`int` | `capacityBuffer` The percentage of the cache to keep in reserve when determining when to clean the cache.
`java.lang.String` | `capacityPolicy` The capacityPolicy object which is used to determine if an object is eligible to be removed from the cache when the cache capacity has been reached.
`int` | `cleanInterval` Number of seconds between cache cleanings
`int` | `internalVersion` Version number used to indicate format changes
`int` | `maxIdleTime` The maximum number of seconds an object can remain idle without being available for removal should the cache fill up
`int` | `pingInterval` Number of seconds between cache death detection(pinging)
`int` | `transport` Deprecated.
`java.lang.String` | `version` Version of the cache software

Fields inherited from class oracle.ias.cache.NamedCacheAttributes
`diskCount, diskPath, diskSize, distribute, dms, dumpFileName, HTTP, isSSLEnabled, logFileName, logger, logLevel, logSeverity, maxObjects, maxSize, REGIONSEPARATOR, sslConfigFilePath, TCP`

Constructor Summary
`CacheAttributes()` Constructs a default CacheAttributes which will set all the values to default.

Method Summary
`void` | `setAutoInit(boolean flag)`
`void` | `setCacheName(java.lang.String name)` sets the cach name
`void` | `setCapacityBuffer(int count)` sets the capacity policy string The capacity policy string must be the class name for a class that extends the CapacityPolicy abstract class and implements the Declarable interface.
`void` | `setCapacityPolicy(java.lang.String policyString)` sets the capacity policy string The capacity policy string must be the class name for a class that extends the CapacityPolicy abstract class and implements the Declarable interface.
`void` | `setCleanInterval(int pCleanInterval)` sets number of seconds between cache cleanings
`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 oracle.ias.cache.NamedCacheAttributes
`addCacheAddr, addCacheAddr, addCacheAddr, addCacheAddr, addPrimaryCacheAddr, addressIsOriginal, clone, getAddrList, getAddrListString, getAddrString, getCacheAddrs, getCacheDumpFilePath, getCoordinatorList, getGroupConfig, getLocalAddress, getLoggerConfigurationFileName, getLogLevel, getLowerPortBoundry, getMulticastAddress, getMulticastInterval, getMulticastPort, getMulticastTTL, getOverrideNodeListenerPort, getResolutionInterval, getUpperPortBoundry, isMulticast, isNodeListenerDeathDetectable, isOverrideLogconfiguration, isPriorityOrderEnabled, removeCacheAddr, setCacheDumpFileName, setDiskCount, setDiskPath, setDiskSize, setDistribute, setDms, setEnableSSL, setKeyStore, setLocalAddress, setLogFileName, setLogger, setLoggerConfigurationFileName, setLogLevel, setLogSeverity, setLowerPortBoundry, setMaxObjects, setMaxSize, setNodeListenerDeathDetectable, setOverrideLogconfiguration, setOverrideNodeListenerPort, setSSLConfigFile, setTransport, setUpperPortBoundry`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### version

    public java.lang.String version

  Version of the cache software

### internalVersion

    public int internalVersion

  Version number used to indicate format changes

### cleanInterval

    public int cleanInterval

  Number of seconds between cache cleanings

### pingInterval

    public int pingInterval

  Number of seconds between cache death detection(pinging)

### capacityPolicy

    public java.lang.String capacityPolicy

  The capacityPolicy object which is used to determine if an object is eligible to be removed from the cache when the cache capacity has been reached.

  The capacity buffer is a percentage of the cache to be held in reserve. That is, the cache system will start looking for objects to be removed from the cache when only the indicated percentage of the cache is available. For example if maxCount is set to 1000 and the capacityBuffer is set to 5 then when the number of objects in the cache reaches 950, the cache will start looking for objects to remove. The default value for capacityBuffer is 15.

### capacityBuffer

    public int capacityBuffer

  The percentage of the cache to keep in reserve when determining when to clean the cache.

### maxIdleTime

    public int maxIdleTime

  The maximum number of seconds an object can remain idle without being available for removal should the cache fill up

### autoInit

    public boolean autoInit

  Whether cache is auto init

### cacheName

    public java.lang.String cacheName

  The name of the cache

### transport

    public int transport

  Deprecated.

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:
  - distribute = false
  - version = 10.1.3
  - maxObjects = 5000
  - diskSize = 10M
  - diskPath = null when diskPath is null, disk caching is disabled.
  - cleanInterval = 60 seconds
  - pingInterval = 60 seconds
  - logger will be DefaultCacheLogger
  - the default log file name for DefaultCacheLogger is javacache.log
  - the default cache address is localHost with port 12345
Since:
  2.0.0

Method Detail

### 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

### setCapacityPolicy

    public void setCapacityPolicy(java.lang.String policyString)

  sets the capacity policy string

  The capacity policy string must be the class name for a class that extends the CapacityPolicy abstract class and implements the Declarable interface. The abstract method CapacityPolicy.policy must be implemented. The capacity policy set in CacheAttributes is the capacity policy for the cache as a whole. The init method of the Declarable interface is called when the object is instantiated to do any initialization required.

  Parameters:
    `policyString` - the class name of the capacity policy object
  Since:
    9.0.4

### setAutoInit

    public void setAutoInit(boolean flag)

  Parameters:
    `flag` - if true auto init is enabled
  Since:
    9.0.4

### setCapacityBuffer

    public void setCapacityBuffer(int count)
                           throws InvalidArgumentException

  sets the capacity policy string

  The capacity policy string must be the class name for a class that extends the CapacityPolicy abstract class and implements the Declarable interface. The abstract method CapacityPolicy.policy must be implemented The capacity policy set in CacheAttributes is the capacity policy for the cache as a whole. The init method of the Declarable interface is called when the object is instantiated to any initialization required.

  Parameters:
    `count` - the capacity buffer
  Throws:
    `InvalidArgumentException`
  Since:
    9.0.4

### setCacheName

    public void setCacheName(java.lang.String name)

  sets the cach name
  Parameters:
    `name` - is the name for the cache
  Since:
    2.0.0

### toString

    public java.lang.String toString()

  converts this object into a formatted string
  Returns:
    a string representation of the object.
  Since:
    2.0.0

Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Server Java Object Cache API Reference 10g Release 3 (10.1.3) B25712-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004, 2005, Oracle. All rights reserved.