org.jboss.ejb.plugins
Class ClusterSyncEntityInstanceCache

java.lang.Object
  extended byorg.jboss.ejb.plugins.AbstractInstanceCache (src) 
      extended byorg.jboss.ejb.plugins.EntityInstanceCache (src) 
          extended byorg.jboss.ejb.plugins.ClusterSyncEntityInstanceCache
All Implemented Interfaces:
AllowedOperationsFlags (src) , ContainerPlugin (src) , DistributedState.DSListenerEx (src) , EntityCache (src) , InstanceCache (src) , MetricsConstants (src) , Monitorable (src) , Service (src) , XmlLoadable (src)

public class ClusterSyncEntityInstanceCache
extends EntityInstanceCache (src)
implements DistributedState.DSListenerEx (src)

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


Field Summary
protected  DistributedState (src) ds
           
protected  java.lang.String DS_CATEGORY
           
 
Fields inherited from class org.jboss.ejb.plugins.AbstractInstanceCache (src)
log
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags (src)
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 (src)
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(java.lang.String key)
           
 void create()
          create the service, do expensive operations etc
 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.
 void start()
          start the service, create is already called
 void stop()
          stop the service
 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.
 
Methods inherited from class org.jboss.ejb.plugins.EntityInstanceCache (src)
acquireContext, activate, canPassivate, createCacheKey, destroy, freeContext, get, getContainer, getKey, passivate, remove, setContainer, setKey
 
Methods inherited from class org.jboss.ejb.plugins.AbstractInstanceCache (src)
doActivate, flush, getCache, getCacheLock, getCachePolicyString, getCacheSize, getPassivatedCount, importXml, insert, isActive, logActivation, logPassivation, release, remove, resetStatistic, retrieveStatistic, sample, 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 (src)
flush, getCacheSize, insert, isActive, release, remove
 

Field Detail

ds

protected DistributedState (src)  ds

DS_CATEGORY

protected java.lang.String DS_CATEGORY
Constructor Detail

ClusterSyncEntityInstanceCache

public ClusterSyncEntityInstanceCache()
Method Detail

create

public void create()
            throws java.lang.Exception
Description copied from interface: Service (src)
create the service, do expensive operations etc

Specified by:
create in interface Service (src)
Overrides:
create in class AbstractInstanceCache (src)
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from interface: Service (src)
start the service, create is already called

Specified by:
start in interface Service (src)
Overrides:
start in class AbstractInstanceCache (src)
Throws:
java.lang.Exception

stop

public void stop()
Description copied from interface: Service (src)
stop the service

Specified by:
stop in interface Service (src)
Overrides:
stop in class AbstractInstanceCache (src)

keyHasBeenRemoved

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.

Specified by:
keyHasBeenRemoved in interface DistributedState.DSListenerEx (src)
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(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.

Specified by:
valueHasChanged in interface DistributedState.DSListenerEx (src)
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(java.lang.String key)