|
Oracle Application Server 10g Java Object Cache API Reference 10g(9.0.4) B10388-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ias.cache.CacheAttributes
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.
Cache.init(CacheAttributes)
Field Summary | |
boolean |
autoInit |
java.lang.String |
cacheName |
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 |
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 |
distribute Indicates the cache is distributed, updates and invalidates are propagated to other caches in the system |
static int |
HTTP HTTP as network protocol for distributed cache |
boolean |
isSSLEnabled Use SSL in the transport protocol |
java.lang.String |
keyStoreLocation Absolute path to the key store |
java.lang.String |
localAddress Local host IP address which may not be the primary address |
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 |
int |
maxIdleTime The maximum number of seconds an object can remain idle without being available for removal should the cache fill up |
int |
maxObjects Maximum number of in-memory objects in the cache |
int |
maxSize The size of the memory cache in megabytes |
boolean |
nlDeathDetectable |
int |
overrideNLPort |
int |
pingInterval Number of seconds between cache death detection(pinging) |
java.lang.String |
sslConfigFilePath Absolute to the SSL configuration file |
static int |
TCP TCP as network protocol for distibuted cache |
int |
transport Transport protocol being used when distribute mode is set. |
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 | |
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 |
void |
addCacheAddr(java.net.InetAddress ipAddr, int port, boolean replace, boolean isOriginal) adds a new ipAddr/port to the list of cache addresses |
void |
addPrimaryCacheAddr(java.net.InetAddress ipAddr, int port) adds a new ipAddr/port to the list of cache addresses |
boolean |
addressIsOriginal(java.net.InetAddress ipAddr, int port) returns true if the ipAddr/port is on the list and is the original address |
java.lang.String |
getAddrListString() Returns the list of cache addresses in a formatted string, if the list is null, set to the default |
java.lang.String |
getAddrString() Returns all the ip:port discovery addresses in a String This differs from getAddrListString in that it only returns the ip:port It doesn't include other information about the port or formatting. |
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. |
oracle.ias.cache.CacheAddress[] |
getCoordinatorList() gets the list of cache cache addresses, if the list is null set to the default |
java.lang.String |
getLocalAddress() Gets the specified localhost IP address for the listener to bind to |
int |
getOverrideNodeListenerPort() Get the override Node Listener port number if it is set |
boolean |
isNodeListenerDeathDetectable() Death detection for local Node Listener for coordinator discovery process |
boolean |
removeCacheAddr(java.net.InetAddress ipAddr, int port) remove an existing ipAddr/port from the list of cache addresses |
void |
setAutoInit(boolean flag) |
void |
setCacheName(java.lang.String name) sets the cach name |
void |
setCapacityBuffer(int count) sets the capacity buffer the percent of the cache capacity to try to hold in reserve |
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 |
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 |
setEnableSSL(boolean enable) enable or disable SSL support for distribute cache |
void |
setKeyStore(java.lang.String name) Sets the key store location |
void |
setLocalAddress(java.lang.String addr) Specifies the localhost IP address for the listener to bind to |
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 |
setNodeListenerDeathDetectable(boolean detect) Enable death detection for local Node Listener |
void |
setOverrideNodeListenerPort(int port) Force the Node Listener to listen on a specific port |
void |
setPingInterval(int pPingInterval) sets number of seconds between cache death detection |
void |
setSSLConfigFile(java.lang.String name) Sets the SSL configuration file location |
void |
setTransport(int mode) Specifies the transport protocol when distribute mode is set |
java.lang.String |
toString() converts this object into a formatted string |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TCP
public static final int HTTP
public boolean distribute
public java.lang.String version
public int maxObjects
public int maxSize
public int diskSize
public java.lang.String diskPath
public int cleanInterval
public int pingInterval
public java.lang.String logger
public java.lang.String logFileName
public int logSeverity
public java.lang.String capacityPolicy
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.
public int capacityBuffer
public int maxIdleTime
public int transport
public boolean isSSLEnabled
public java.lang.String keyStoreLocation
public java.lang.String sslConfigFilePath
public java.lang.String localAddress
public java.lang.String cacheName
public boolean autoInit
public boolean nlDeathDetectable
public int overrideNLPort
Constructor Detail |
public CacheAttributes() throws CacheException
Method Detail |
public void setDistribute(boolean pDistribute)
pDistribute
- is true, means the cache is part of the distributed cache otherwise, the cache is local to the process.public void setMaxObjects(int pMaxObjects)
pMaxObjects
- maximum number of in-memory objects in the cachepublic void setMaxSize(int pMaxSize)
public void setDiskSize(int pDiskSize)
pDiskSize
- the disk cache size in megabytespublic void setDiskPath(java.lang.String pDiskPath)
pDiskPath
- the absolute path to the root of the disk cache directorypublic void setCleanInterval(int pCleanInterval)
pCleanInterval
- number of seconds between cache cleaningspublic void setPingInterval(int pPingInterval)
pPingInterval
- number of seconds between cache death detectionpublic void setLogger(java.lang.String pLogger)
pLogger
- an object extends CacheLoggerpublic void setLogSeverity(int severity)
severity
- log severitypublic void setLogFileName(java.lang.String pLogFileName)
pLogFileName
- the log file name for the DefaultCacheLogger.public void setCapacityPolicy(java.lang.String policyString)
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.
policyString
- the class name of the capacity policy objectpublic void setAutoInit(boolean flag)
flag
- if true auto init is enabledpublic void setCacheName(java.lang.String name)
public void setKeyStore(java.lang.String name)
public void setSSLConfigFile(java.lang.String name)
public void setEnableSSL(boolean enable)
public void setTransport(int mode)
public void setLocalAddress(java.lang.String addr)
public void setCapacityBuffer(int count) throws InvalidArgumentException
count
- percent of the cache to try to maintain as availableInvalidArgumentException
public void addCacheAddr(java.net.InetAddress ipAddr, int port)
ipAddr
- the inet addressport
- the portpublic void addCacheAddr(java.net.InetAddress ipAddr, int port, boolean replace)
ipAddr
- the inet addressport
- the portreplace
- if the IP address already exists. The previous address would be discarded.public void addCacheAddr(java.net.InetAddress ipAddr, int port, boolean replace, boolean isOriginal)
ipAddr
- the inet addressport
- the portreplace
- if the IP address already exists. The previous address would be discarded.isOriginal
-public void addPrimaryCacheAddr(java.net.InetAddress ipAddr, int port)
ipAddr
- the inet addressport
- the portpublic boolean addressIsOriginal(java.net.InetAddress ipAddr, int port)
ipAddr
- the inet addressport
- the portpublic boolean removeCacheAddr(java.net.InetAddress ipAddr, int port)
ipAddr
- the inet addressport
- the portpublic java.util.Enumeration getCacheAddrs()
public oracle.ias.cache.CacheAddress[] getCoordinatorList()
public java.lang.String getAddrListString()
public java.lang.String getAddrString()
public java.lang.String getLocalAddress()
public boolean isNodeListenerDeathDetectable()
public void setNodeListenerDeathDetectable(boolean detect)
public void setOverrideNodeListenerPort(int port)
public int getOverrideNodeListenerPort()
public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle Application Server 10g Java Object Cache API Reference 10g(9.0.4) B10388-01 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |