public class

InstanceMonitor

extends Object
implements InstanceMonitorMBean
java.lang.Object
   ↳ org.apache.helix.monitoring.mbeans.InstanceMonitor

Class Overview

Implementation of the instance status bean

Summary

Public Constructors
InstanceMonitor(String clusterName, String participantName)
Initialize the bean
Public Methods
String getBeanName()
Helper for basic formatted view of this bean
long getEnabled()
Check if this instance is enabled
String getInstanceName()
Get the name of the monitored instance
long getOnline()
Check if this instance is live
String getSensorName()
List<String> getTags()
Get all the tags currently on this instance
synchronized void updateInstance(Set<String> tags, Set<String> disabledPartitions, boolean isLive, boolean isEnabled)
Update the gauges for this instance
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.monitoring.SensorNameProvider
From interface org.apache.helix.monitoring.mbeans.InstanceMonitorMBean

Public Constructors

public InstanceMonitor (String clusterName, String participantName)

Initialize the bean

Parameters
clusterName the cluster to monitor
participantName the instance whose statistics this holds

Public Methods

public String getBeanName ()

Helper for basic formatted view of this bean

Returns
  • bean name

public long getEnabled ()

Check if this instance is enabled

Returns
  • 1 if enabled, 0 if disabled

public String getInstanceName ()

Get the name of the monitored instance

Returns
  • instance name as a string

public long getOnline ()

Check if this instance is live

Returns
  • 1 if running, 0 otherwise

public String getSensorName ()

public List<String> getTags ()

Get all the tags currently on this instance

Returns
  • list of tags

public synchronized void updateInstance (Set<String> tags, Set<String> disabledPartitions, boolean isLive, boolean isEnabled)

Update the gauges for this instance

Parameters
tags current tags
disabledPartitions current disabled partitions
isLive true if running, false otherwise
isEnabled true if enabled, false if disabled