org.jboss.ejb.plugins
Class InvalidableEntityInstanceCache

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

public class InvalidableEntityInstanceCache
extends EntityInstanceCache (src)
implements Invalidatable (src)

Cache implementation that registers with an InvalidationManager when in commit option A or D. Information is found in the EB meta-data (IM name, IG name and commit-option)

See Also:
InvalidationManagerMBean (src) , EntityBeanCacheBatchInvalidatorInterceptor (src)

Field Summary
protected  InvalidationGroup (src) ig
           
protected  InvalidationManagerMBean (src) invalMgr
           
protected  boolean isTraceEnabled
           
 
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
InvalidableEntityInstanceCache()
           
 
Method Summary
 void areInvalid(java.io.Serializable[] keys)
          Indicates that the resources with the give keys should be invalidated (i.e.
protected  void doInvalidate(java.io.Serializable key)
           
 void invalidateAll()
          All entries should be invalidated.
 void isInvalid(java.io.Serializable key)
          Indicates that the resource with the given key should be invalidated (i.e.
 void start()
          start the service, create is already called
 void stop()
          stop the service
 
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)
create, 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
 
Methods inherited from interface org.jboss.system.Service (src)
create
 

Field Detail

invalMgr

protected InvalidationManagerMBean (src)  invalMgr

ig

protected InvalidationGroup (src)  ig

isTraceEnabled

protected boolean isTraceEnabled
Constructor Detail

InvalidableEntityInstanceCache

public InvalidableEntityInstanceCache()
Method Detail

areInvalid

public void areInvalid(java.io.Serializable[] keys)
Description copied from interface: Invalidatable (src)
Indicates that the resources with the give keys should be invalidated (i.e. removed from cache)

Specified by:
areInvalid in interface Invalidatable (src)
Parameters:
keys - Keys of the resources to be invalidated

isInvalid

public void isInvalid(java.io.Serializable key)
Description copied from interface: Invalidatable (src)
Indicates that the resource with the given key should be invalidated (i.e. removed from cache)

Specified by:
isInvalid in interface Invalidatable (src)
Parameters:
key - Key of the resource to be invalidated

invalidateAll

public void invalidateAll()
Description copied from interface: Invalidatable (src)
All entries should be invalidated.

Specified by:
invalidateAll in interface Invalidatable (src)

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)

doInvalidate

protected void doInvalidate(java.io.Serializable key)