Class MetricsBuilderFactory

java.lang.Object
com.atlassian.beehive.core.stats.MetricsBuilderFactory

public final class MetricsBuilderFactory extends Object
Util class for constructing metrics builder to be used for measuring lock timer metrics to JMX.
Since:
v4.1.0
  • Method Details

    • newClusterLockHeldMetricsBuilder

      public static com.atlassian.util.profiling.Metrics.Builder newClusterLockHeldMetricsBuilder(String pluginKey, String lockName, String implementationName)
      Constructs Metrics.Builder to use for measuring how long a cluster lock was held by a plugin.
      Parameters:
      pluginKey - the name of the plugin that created this lock
      lockName - the name of the lock
      implementationName - the name of the lock service implementation (e.g. DatabaseClusterLockService, HazelcastClusterLockService)
      Returns:
      a metrics builder
    • newClusterLockAwaitedMetricsBuilder

      public static com.atlassian.util.profiling.Metrics.Builder newClusterLockAwaitedMetricsBuilder(String pluginKey, String lockName, String implementationName)
      Constructs Metrics.Builder to use for measuring how long a cluster lock was awaited by a plugin.
      Parameters:
      pluginKey - the name of the plugin that created this lock
      lockName - the name of the lock
      implementationName - the name of the lock service implementation (e.g. DatabaseClusterLockService, HazelcastClusterLockService)
      Returns:
      a metrics builder