akka.cluster
Class JmxMetricsCollector

java.lang.Object
  extended by akka.cluster.JmxMetricsCollector
All Implemented Interfaces:
MetricsCollector, java.io.Closeable
Direct Known Subclasses:
SigarMetricsCollector

public class JmxMetricsCollector
extends java.lang.Object
implements MetricsCollector

Loads JVM and system metrics through JMX monitoring beans.


Constructor Summary
JmxMetricsCollector(ActorSystem system)
          This constructor is used when creating an instance from configured FQCN
JmxMetricsCollector(Address address, double decayFactor)
           
 
Method Summary
 void close()
           
 scala.Option<Metric> heapCommitted(java.lang.management.MemoryUsage heap)
          (JMX) Returns the current sum of heap memory guaranteed to be available to the JVM from all heap memory pools (in bytes).
 scala.Option<Metric> heapMax(java.lang.management.MemoryUsage heap)
          (JMX) Returns the maximum amount of memory (in bytes) that can be used for JVM memory management.
 java.lang.management.MemoryUsage heapMemoryUsage()
          Current heap to be passed in to heapUsed, heapCommitted and heapMax
 scala.Option<Metric> heapUsed(java.lang.management.MemoryUsage heap)
          (JMX) Returns the current sum of heap memory used from all heap memory pools (in bytes).
 scala.collection.immutable.Set<Metric> metrics()
           
 scala.Option<Metric> processors()
          (JMX) Returns the number of available processors Creates a new instance each time.
 NodeMetrics sample()
          Samples and collects new data points.
 scala.Option<Metric> systemLoadAverage()
          JMX Returns the OS-specific average load on the CPUs in the system, for the past 1 minute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.cluster.MetricsCollector
apply
 

Constructor Detail

JmxMetricsCollector

public JmxMetricsCollector(Address address,
                           double decayFactor)

JmxMetricsCollector

public JmxMetricsCollector(ActorSystem system)
This constructor is used when creating an instance from configured FQCN

Method Detail

sample

public NodeMetrics sample()
Samples and collects new data points. Creates a new instance each time.

Specified by:
sample in interface MetricsCollector

metrics

public scala.collection.immutable.Set<Metric> metrics()

systemLoadAverage

public scala.Option<Metric> systemLoadAverage()
JMX Returns the OS-specific average load on the CPUs in the system, for the past 1 minute. On some systems the JMX OS system load average may not be available, in which case a -1 is returned from JMX, and None is returned from this method. Creates a new instance each time.


processors

public scala.Option<Metric> processors()
(JMX) Returns the number of available processors Creates a new instance each time.


heapMemoryUsage

public java.lang.management.MemoryUsage heapMemoryUsage()
Current heap to be passed in to heapUsed, heapCommitted and heapMax


heapUsed

public scala.Option<Metric> heapUsed(java.lang.management.MemoryUsage heap)
(JMX) Returns the current sum of heap memory used from all heap memory pools (in bytes). Creates a new instance each time.


heapCommitted

public scala.Option<Metric> heapCommitted(java.lang.management.MemoryUsage heap)
(JMX) Returns the current sum of heap memory guaranteed to be available to the JVM from all heap memory pools (in bytes). Creates a new instance each time.


heapMax

public scala.Option<Metric> heapMax(java.lang.management.MemoryUsage heap)
(JMX) Returns the maximum amount of memory (in bytes) that can be used for JVM memory management. If not defined the metrics value is None, i.e. never negative. Creates a new instance each time.


close

public void close()
Specified by:
close in interface java.io.Closeable