Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.mbeans
Interface CacheMBean

All Superinterfaces:
  com.bea.p13n.cache.internal.system.CacheConfig, ConfigurationMBean, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, ServiceConfigurationMBean, WebLogicMBean

public interface CacheMBean
extends ServiceConfigurationMBean, com.bea.p13n.cache.internal.system.CacheConfig

The MBean that configures individual instances of a cache. The name of this MBean corresponds to the name of the cache (as retrieved from CacheFactoy.getCache(name)). If this MBean does not exist for a cache, the CacheFactory will pick appropriate values (usually the defaults) for a new cache.

See Also:
  `Cache`, `CacheFactory`

Field Summary

Fields inherited from interface weblogic.management.configuration.ConfigurationMBean
`CACHING_STUB_SVUID, DEFAULT_EMPTY_BYTE_ARRAY`

Fields inherited from interface com.bea.p13n.cache.internal.system.CacheConfig
`DEFAULT_ENABLED, DEFAULT_MAX_ENTRIES, DEFAULT_TTL, MAX_ENTRIES_MAX, TTL_NEVER_EXPIRE`

Method Summary
`boolean` | `getEnabled()` Get enabled mode of cache.
`int` | `getMaxEntries()` Get maximum number of entries allowed in the cache.
`long` | `getTimeToLive()` Get default time to live for cache elements (in milliseconds).
`void` | `setEnabled(boolean isEnabled)` Set enabled mode of cache.
`void` | `setMaxEntries(int size)` Set the maximum number of entries allowed in the cache.
`void` | `setTimeToLive(long ttl)` Set the default time-to-live (in millisec) for elements added to the cache.

Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
`freezeCurrentValue, getAttributeStringValue, getComments, getNotes, getSetFields, getXmlConverter, isDefaultedMBean, isPersistenceEnabled, preDeregister, registerConfigMBean, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled, touch, unRegisterConfigMBean`

Methods inherited from interface weblogic.management.WebLogicMBean
`getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent`

Methods inherited from interface javax.management.DynamicMBean
`getAttribute, getAttributes, invoke, setAttribute, setAttributes`

Methods inherited from interface javax.management.MBeanRegistration
`postDeregister, postRegister, preRegister`

Methods inherited from interface javax.management.NotificationBroadcaster
`addNotificationListener, getNotificationInfo, removeNotificationListener`

Method Detail

### getEnabled

    public boolean getEnabled()

  Get enabled mode of cache.

  Specified by:
    `getEnabled` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  MBean Attribute Default Value:
    DEFAULT_ENABLED
  MBean Attribute Old Property Name:
    cacheName.enabled

### getMaxEntries

    public int getMaxEntries()

  Get maximum number of entries allowed in the cache.

  Specified by:
    `getMaxEntries` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  MBean Attribute Default Value:
    DEFAULT_MAX_ENTRIES
  MBean Attribute Old Property Name:
    cacheName.capacity

### getTimeToLive

    public long getTimeToLive()

  Get default time to live for cache elements (in milliseconds).

  Specified by:
    `getTimeToLive` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  MBean Attribute Default Value:
    DEFAULT_TTL
  MBean Attribute Old Property Name:
    cacheName.ttl

### setEnabled

    public void setEnabled(boolean isEnabled)

  Set enabled mode of cache. Disabling the cache will cause fetch, add, and remove to do nothing.

  The cache may be cleared of its contents by checking the "flush" tab on the cache administration console.

  Specified by:
    `setEnabled` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  Parameters:
    `isEnabled` - Enabled state of the cache
  MBean Dynamic Method

### setMaxEntries

    public void setMaxEntries(int size)

  Set the maximum number of entries allowed in the cache. If the number of elements in the cache exceeds this size, older elements will be removed (using an LRU strategy).

  Specified by:
    `setMaxEntries` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  Parameters:
    `size` - Maximum number of elements allowed in the cache
  MBean Dynamic Method
  MBean Attribute Legal Max:
    MAX_ENTRIES_MAX
  MBean Attribute Legal Min:
    1

### setTimeToLive

    public void setTimeToLive(long ttl)

  Set the default time-to-live (in millisec) for elements added to the cache. Must be set to a positive number or to TTL_NEVER_EXPIRE.

  Specified by:
    `setTimeToLive` in interface `com.bea.p13n.cache.internal.system.CacheConfig`
  Parameters:
    `ttl` - Default time to live for cache elements, in milliseconds
  MBean Dynamic Method
  MBean Attribute Legal Expression:
    (value > 0) || (value == com.bea.p13n.mbeans.CacheMBean.TTL_NEVER_EXPIRE)

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved