|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mtgi.analytics.jmx.StatisticsMBeanEventPersisterImpl
public class StatisticsMBeanEventPersisterImpl
An event persister which aggregates statistics for each type of event in memory, exposing those statistics as MBeans.
Configuration is very similar to that of the Spring Framework class MBeanExporter.
BehaviorEvent MBeans are named (and thus grouped for aggregation)
by an implementation of ObjectNamingStrategy;
EventTypeNamingStrategy is used by default. Each MBean is backed by an instance of
StatisticsMBean, which is converted into a ModelMBean by an instance of
MBeanInfoAssembler; MetadataMBeanInfoAssembler
is used by default. Statistics mbeans are registered in an instance of MBeanServer;
JmxUtils.locateMBeanServer() is used to choose the default platform MBean server
if none is specified.
| Constructor Summary | |
|---|---|
StatisticsMBeanEventPersisterImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
protected StatisticsMBean |
getStatistics(BehaviorEvent event)
Retrieve an aggregator for the given behavior event. |
void |
persist(java.util.Queue<BehaviorEvent> events)
Store the given completed events, assigning unique identifiers to each and persisting all instances to the database. |
void |
setAssembler(org.springframework.jmx.export.assembler.MBeanInfoAssembler assembler)
|
void |
setNamingStrategy(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)
|
void |
setServer(javax.management.MBeanServer server)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticsMBeanEventPersisterImpl()
| Method Detail |
|---|
public void setNamingStrategy(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)
public void setAssembler(org.springframework.jmx.export.assembler.MBeanInfoAssembler assembler)
public void setServer(javax.management.MBeanServer server)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic void persist(java.util.Queue<BehaviorEvent> events)
BehaviorEventPersisterStore the given completed events, assigning unique identifiers to each and persisting all instances to the database. Some of the events may already have identifiers assigned; in this case, that identifer should be respected and a new one not assigned.
Persisters must support the persisting of child events before their parents, since this is generally the natural order in which events are completed.
Some members of the given collection may have parent events that are not in the collection itself. These parent events should not be persisted, though they must be assigned IDs.
persist in interface BehaviorEventPersister
protected StatisticsMBean getStatistics(BehaviorEvent event)
throws javax.management.RuntimeOperationsException,
javax.management.modelmbean.InvalidTargetObjectTypeException,
javax.management.JMException
event, never null
javax.management.RuntimeOperationsException
javax.management.modelmbean.InvalidTargetObjectTypeException
javax.management.JMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||