Methods Summary |
---|
public void | cacheMiss(java.lang.String key)
// a modification has occured on another node, we clean the cache!
try
{
this.remove(key);
}
catch (Exception e)
{
log.warn("failed to remove key" ,e);
}
|
public void | create()
super.create ();
// Get a reference to the DS service
ClusterConfigMetaData config = getContainer().getBeanMetaData().getClusterConfigMetaData();
String partitionName = config.getPartitionName();
String name = "jboss:service=DistributedState,partitionName=" + partitionName;
ds = (DistributedState) Registry.lookup (name);
if( ds == null )
throw new DeploymentException("Failed to find DistributedState service: "+name);
|
public void | keyHasBeenRemoved(java.lang.String category, java.io.Serializable key, java.io.Serializable previousContent, boolean locallyModified)Called whenever a key has been removed from a category the called object had
subscribed in.
if (!locallyModified)
this.cacheMiss ((String)key);
|
public void | start()
super.start ();
String ejbName = this.getContainer ().getBeanMetaData ().getEjbName ();
this.DS_CATEGORY = "CMPClusteredInMemoryPersistenceManager-" + ejbName;
this.ds.registerDSListenerEx (this.DS_CATEGORY, this);
|
public void | stop()
super.stop ();
this.ds.unregisterDSListenerEx (this.DS_CATEGORY, this);
|
public void | valueHasChanged(java.lang.String category, java.io.Serializable key, java.io.Serializable value, boolean locallyModified)Called whenever a key has been added or modified in the category the called object
has subscribed in.
if (!locallyModified)
this.cacheMiss ((String)key);
|