org.jboss.monitor
Class EntityLockMonitor

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.monitor.EntityLockMonitor
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, EntityLockMonitorMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class EntityLockMonitor
extends org.jboss.system.ServiceMBeanSupport
implements EntityLockMonitorMBean

MBean implementation for providing Locking Stats for EntityBeans

Version:
$Revision: 1.6.6.3 $
Author:
Bill Burke, Dimitris Andreadis

Field Summary
protected  long contenders
           
protected  long contentions
           
static String JNDI_NAME
           
protected  long maxContenders
           
protected  HashMap monitorMap
           
protected  long sumContenders
           
protected  ArrayList times
           
protected  long totalTime
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
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
EntityLockMonitor()
           
 
Method Summary
 void clearMonitor()
           
 void decrementContenders(long time)
           
 long getAverageContenders()
           
 LockMonitor getEntityLockMonitor(String jndiName)
           
 LockMonitor getLockMonitor(String jndiName)
           
 long getMaxContenders()
           
 long getMedianWaitTime()
           
 long getTotalContentions()
           
 void incrementContenders()
           
 Set listMonitoredBeans()
           
 String printLockMonitor()
           
protected  void startService()
           
protected  void stopService()
           
 
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
 
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
 

Field Detail

JNDI_NAME

public static final String JNDI_NAME
See Also:
Constant Field Values

monitorMap

protected HashMap monitorMap

contenders

protected long contenders

maxContenders

protected long maxContenders

times

protected ArrayList times

contentions

protected long contentions

totalTime

protected long totalTime

sumContenders

protected long sumContenders
Constructor Detail

EntityLockMonitor

public EntityLockMonitor()
Method Detail

startService

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

stopService

protected void stopService()
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport

getAverageContenders

public long getAverageContenders()
Specified by:
getAverageContenders in interface EntityLockMonitorMBean

getMaxContenders

public long getMaxContenders()
Specified by:
getMaxContenders in interface EntityLockMonitorMBean

getMedianWaitTime

public long getMedianWaitTime()
Specified by:
getMedianWaitTime in interface EntityLockMonitorMBean

getTotalContentions

public long getTotalContentions()
Specified by:
getTotalContentions in interface EntityLockMonitorMBean

listMonitoredBeans

public Set listMonitoredBeans()
Specified by:
listMonitoredBeans in interface EntityLockMonitorMBean

getLockMonitor

public LockMonitor getLockMonitor(String jndiName)
Specified by:
getLockMonitor in interface EntityLockMonitorMBean
Returns:
the LockMonitor that corresponds to the jndiName or null

printLockMonitor

public String printLockMonitor()
Specified by:
printLockMonitor in interface EntityLockMonitorMBean

clearMonitor

public void clearMonitor()
Specified by:
clearMonitor in interface EntityLockMonitorMBean

incrementContenders

public void incrementContenders()

decrementContenders

public void decrementContenders(long time)

getEntityLockMonitor

public LockMonitor getEntityLockMonitor(String jndiName)


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