© 2002 BEA Systems, Inc.


com.bea.p13n.mbeans
Interface CacheManagerMBean


public interface CacheManagerMBean
extends ServiceConfigurationMBean

This MBean is the parent for the individual instances of CacheMBeans. It is used to signal individual caches (by name) to be flushed, to invalidate some cached item (by key).


Fields inherited from class weblogic.management.configuration.ConfigurationMBean
CACHING_STUB_SVUID
 
Method Summary
 void flushCache(java.lang.String cacheName)
          Flush all instances of this named cache.
 void invalidateKey(java.lang.String cacheName, java.io.Serializable key)
          Invalidate a key in the cache.
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
addLinkMbeanAttribute, getAttributeStringValue, getNotes, getSetFields, getXml, getXmlConverter, isPersistenceEnabled, setNotes, setPersistenceEnabled
 
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, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

invalidateKey

public void invalidateKey(java.lang.String cacheName,
                          java.io.Serializable key)
Invalidate a key in the cache. Note that the key must be Serializable, as it may be sent to several clustered servers. It is also strongly urged (if not required) that the key implement hashcode() and equals() in such a way that the serialized key will match the intended key in the cache.

This method will remove the key for all instances of the named cache. It sends a notification to all registered CacheNotificationListeners, who will in turn notify their associated Cache objects to invalidate this key.

These listeners are created by the CacheFactory object and registered with the CacheManagerMBean. Notifications are sent and tagged with the cache name.

A dynamic MBean attribute
Parameters:
cacheName - The name of the cache to update
key - the key of a key/value pair to in the cache to invalidate

flushCache

public void flushCache(java.lang.String cacheName)
Flush all instances of this named cache. Send a notification to all registered CacheNotificationListeners, who will in turn notify their associated Cache objects to flush.

These listeners are created by the CacheFactory object and registered with the CacheManagerMBean. Notifications are sent and tagged with the cache name.

A dynamic MBean attribute
Parameters:
cacheName - The name of the cache to flush

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved