001package io.prometheus.client.hotspot;
002
003/**
004 * Registers the default Hotspot collectors.
005 * <p>
006 * This is intended to avoid users having to add in new
007 * registrations every time a new exporter is added.
008 * <p>
009 * Example usage:
010 * <pre>
011 * {@code
012 *   DefaultExports.initialize();
013 * }
014 * </pre>
015 */
016public class DefaultExports {
017  private static boolean initialized = false;
018  /**
019   * Register the default Hotspot collectors.
020   */
021  public static synchronized void initialize() {
022    if (!initialized) {
023      new StandardExports().register();
024      new MemoryPoolsExports().register();
025      new GarbageCollectorExports().register();
026      new ThreadExports().register();
027      new ClassLoadingExports().register();
028      new VersionInfoExports().register();
029      initialized = true;
030    }
031  }
032
033}