org.jboss.ejb.plugins
Class ClusterSyncEntityInstanceCache

java.lang.Object
  extended by org.jboss.ejb.plugins.AbstractInstanceCache
      extended by org.jboss.ejb.plugins.EntityInstanceCache
          extended by org.jboss.ejb.plugins.ClusterSyncEntityInstanceCache
All Implemented Interfaces:
org.jboss.ejb.AllowedOperationsFlags, org.jboss.ejb.ContainerPlugin, org.jboss.ejb.EntityCache, org.jboss.ejb.InstanceCache, org.jboss.ejb.plugins.AbstractInstanceCacheMBean, org.jboss.ejb.plugins.EntityInstanceCacheMBean, DistributedState.DSListenerEx, org.jboss.metadata.XmlLoadable, org.jboss.monitor.MetricsConstants, org.jboss.monitor.Monitorable, org.jboss.system.Service

public class ClusterSyncEntityInstanceCache
extends org.jboss.ejb.plugins.EntityInstanceCache
implements DistributedState.DSListenerEx

Cache subclass for entity beans shared accross a cluster with distributed cache corruption mechanism.

Version:
$Revision: 1.6.6.1 $
Author:
Sacha Labourey

Field Summary
protected  DistributedState ds
           
protected  String DS_CATEGORY
           
 
Fields inherited from class org.jboss.ejb.plugins.AbstractInstanceCache
log
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED
 
Fields inherited from interface org.jboss.monitor.MetricsConstants
ACTIVITY, APPLICATION, BEAN, BEANCACHE_METRICS, CHECKPOINT, INVOCATION_METRICS, MEMORY_MONITOR, METHOD, PRIMARY_KEY, SYSTEM_METRICS, THREAD_MONITOR, TIME, TYPE
 
Constructor Summary
ClusterSyncEntityInstanceCache()
           
 
Method Summary
 void cacheMiss(String key)
           
 void create()
           
 void keyHasBeenRemoved(String category, Serializable key, Serializable previousContent, boolean locallyModified)
          Called whenever a key has been removed from a category the called object had subscribed in.
 void start()
           
 void stop()
           
 void valueHasChanged(String category, Serializable key, Serializable value, boolean locallyModified)
          Called whenever a key has been added or modified in the category the called object has subscribed in.
 
Methods inherited from class org.jboss.ejb.plugins.EntityInstanceCache
acquireContext, activate, canPassivate, createCacheKey, destroy, freeContext, get, getContainer, getKey, passivate, remove, setContainer, setKey, unableToPassivateDueToCtxLock
 
Methods inherited from class org.jboss.ejb.plugins.AbstractInstanceCache
doActivate, flush, getCache, getCacheLock, getCachePolicyString, getCacheSize, getPassivatedCount, importXml, insert, isActive, logActivation, logPassivation, release, remove, resetStatistic, retrieveStatistic, sample, tryToPassivate, tryToPassivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb.InstanceCache
flush, getCacheSize, insert, isActive, release, remove
 
Methods inherited from interface org.jboss.ejb.plugins.AbstractInstanceCacheMBean
flush, getCachePolicyString, getCacheSize, getPassivatedCount, remove
 

Field Detail

ds

protected DistributedState ds

DS_CATEGORY

protected String DS_CATEGORY
Constructor Detail

ClusterSyncEntityInstanceCache

public ClusterSyncEntityInstanceCache()
Method Detail

create

public void create()
            throws Exception
Specified by:
create in interface org.jboss.system.Service
Overrides:
create in class org.jboss.ejb.plugins.AbstractInstanceCache
Throws:
Exception

start

public void start()
           throws Exception
Specified by:
start in interface org.jboss.system.Service
Overrides:
start in class org.jboss.ejb.plugins.AbstractInstanceCache
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface org.jboss.system.Service
Overrides:
stop in class org.jboss.ejb.plugins.AbstractInstanceCache

keyHasBeenRemoved

public void keyHasBeenRemoved(String category,
                              Serializable key,
                              Serializable previousContent,
                              boolean locallyModified)
Called whenever a key has been removed from a category the called object had subscribed in.

Specified by:
keyHasBeenRemoved in interface DistributedState.DSListenerEx
Parameters:
category - The category under which a key has been removed
key - The key that has been removed
previousContent - The previous content of the key that has been removed

valueHasChanged

public void valueHasChanged(String category,
                            Serializable key,
                            Serializable value,
                            boolean locallyModified)
Called whenever a key has been added or modified in the category the called object has subscribed in.

Specified by:
valueHasChanged in interface DistributedState.DSListenerEx
Parameters:
category - The category of the modified/added entry
key - The key that has been added or its value modified
value - The new value of the key

cacheMiss

public void cacheMiss(String key)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.