CacheManagerMBean Interface

com.bea.p13n.mbeans
CacheManagerMBean Interface

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).


All Superinterfaces
ConfigurationMBean, DynamicMBean, MBeanRegistration, NotificationBroadcaster, ServiceConfigurationMBean, WebLogicMBean

Field Summary

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

Method Summary

public void
flushCache(String cacheName)
Flush all instances of this named cache.
public void
invalidateKey(String cacheName, Serializable key)
Invalidate a key in the cache.
 
Methods from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getAttributeStringValue, getComments, getNotes, getSetFields, getXml, getXmlConverter, isDefaultedMBean, isPersistenceEnabled, preDeregister, registerConfigMBean, restoreDefaultValue, setComments, setDefaultedMBean, setNotes, setPersistenceEnabled, touch, unRegisterConfigMBean
 
Methods from interface javax.management.DynamicMBean
getAttribute, getAttributes, getMBeanInfo, invoke, setAttribute, setAttributes
 
Methods from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods from interface com.bea.p13n.management.ServiceConfigurationMBean
 
Methods from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
   

Method Detail

flushCache(String) Method

public void flushCache(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.

Parameters

cacheName
The name of the cache to flush

invalidateKey(String, Serializable) Method

public void invalidateKey(String cacheName, 
                          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.

Parameters

cacheName
The name of the cache to update
key
the key of a key/value pair to in the cache to invalidate