org.jboss.varia.stats
Class CacheListener

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.varia.stats.CacheListener
All Implemented Interfaces:
Cache.Listener (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class CacheListener
extends ServiceMBeanSupport (src)
implements Cache.Listener (src)


Nested Class Summary
static class CacheListener.ContentionStats (src)
           
static class CacheListener.EvictionStats (src)
           
static class CacheListener.HitStats (src)
           
static class CacheListener.MissStats (src)
           
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener (src)
NOOP
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
CacheListener()
           
 
Method Summary
 void contention(int partitionIndex, long time)
           
 void eviction(int partitionIndex, java.lang.Object pk, int size)
           
 ObjectName (src) getCacheName()
           
 ObjectName (src) getStatsCollector()
           
 void hit(int partitionIndex)
           
 void miss(int partitionIndex)
           
 void setCacheName(ObjectName (src)  cacheName)
           
 void setStatsCollector(ObjectName (src)  statsCollector)
           
 void startService()
          Sub-classes should override this method to provide custum 'start' logic.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheListener

public CacheListener()
Method Detail

getStatsCollector

public ObjectName (src)  getStatsCollector()

setStatsCollector

public void setStatsCollector(ObjectName (src)  statsCollector)

getCacheName

public ObjectName (src)  getCacheName()

setCacheName

public void setCacheName(ObjectName (src)  cacheName)

startService

public void startService()
                  throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

contention

public void contention(int partitionIndex,
                       long time)
Specified by:
contention in interface Cache.Listener (src)

eviction

public void eviction(int partitionIndex,
                     java.lang.Object pk,
                     int size)
Specified by:
eviction in interface Cache.Listener (src)

hit

public void hit(int partitionIndex)
Specified by:
hit in interface Cache.Listener (src)

miss

public void miss(int partitionIndex)
Specified by:
miss in interface Cache.Listener (src)