org.jboss.varia.stats
Class CacheListener

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.varia.stats.CacheListener
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener, org.jboss.system.Service, org.jboss.system.ServiceMBean, CacheListenerMBean

public class CacheListener
extends org.jboss.system.ServiceMBeanSupport
implements org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener, CacheListenerMBean

Version:
$Revision: 57210 $
Author:
Alexey Loubyansky

Nested Class Summary
static class CacheListener.ContentionStats
           
static class CacheListener.EvictionStats
           
static class CacheListener.HitStats
           
static class CacheListener.MissStats
           
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener
NOOP
 
Fields inherited from interface org.jboss.system.ServiceMBean
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, Object pk, int size)
           
 javax.management.ObjectName getCacheName()
           
 javax.management.ObjectName getStatsCollector()
           
 void hit(int partitionIndex)
           
 void miss(int partitionIndex)
           
 void setCacheName(javax.management.ObjectName cacheName)
           
 void setStatsCollector(javax.management.ObjectName statsCollector)
           
 void startService()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

CacheListener

public CacheListener()
Method Detail

getStatsCollector

public javax.management.ObjectName getStatsCollector()
Specified by:
getStatsCollector in interface CacheListenerMBean

setStatsCollector

public void setStatsCollector(javax.management.ObjectName statsCollector)
Specified by:
setStatsCollector in interface CacheListenerMBean

getCacheName

public javax.management.ObjectName getCacheName()
Specified by:
getCacheName in interface CacheListenerMBean

setCacheName

public void setCacheName(javax.management.ObjectName cacheName)
Specified by:
setCacheName in interface CacheListenerMBean

startService

public void startService()
                  throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

contention

public void contention(int partitionIndex,
                       long time)
Specified by:
contention in interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener

eviction

public void eviction(int partitionIndex,
                     Object pk,
                     int size)
Specified by:
eviction in interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener

hit

public void hit(int partitionIndex)
Specified by:
hit in interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener

miss

public void miss(int partitionIndex)
Specified by:
miss in interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache.Listener


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