blob: e729d585c5412f55ebf3297ffa284e3a4e18d33b [file] [log] [blame]
package org.apache.ignite.internal.metrics;
/**
* Interface for all metrics source.
*/
public interface MetricsSource {
/**
* Returns metric source name.
*
* @return Metric source name.
*/
String name();
/**
* Enables metrics for metric source. Creates and returns {@link MetricsSet} built during enabling.
*
* @return Newly created {@link MetricsSet} instance or {@code null} if metrics are already enabled.
*/
MetricsSet enable();
/**
* Disables metrics for metric source.
*/
void disable();
/**
* Checks whether metrics is enabled (switched on) or not (switched off) for metric source.
*
* @return {@code True} if metrics are enabled, otherwise - {@code false}.
*/
boolean enabled();
}