blob: daaa948788cd4734835e6e98464ba2a723135ad9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>Metadata</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Metadata";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/microprofile/metrics/Histogram.html" title="interface in org.eclipse.microprofile.metrics"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/microprofile/metrics/Meter.html" title="interface in org.eclipse.microprofile.metrics"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/microprofile/metrics/Metadata.html" target="_top">Frames</a></li>
<li><a href="Metadata.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.microprofile.metrics</div>
<h2 title="Class Metadata" class="title">Class Metadata</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.eclipse.microprofile.metrics.Metadata</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Metadata</span>
extends java.lang.Object</pre>
<div class="block">Bean holding the metadata of one single metric.
The metadata contains:
<ul>
<li>
<code>Name</code>: (Required) The name of the metric.
</li>
<li>
<code>Display name</code>: (Optional) The display (friendly) name of the metric.
By default, it is set to the <code>Name</code>.
</li>
<li>
<code>Description</code>: (Optional) A human readable description of the metric.
</li>
<li>
<code>Type</code>: (Required) The type of the metric. See <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a>.
</li>
<li>
<code>Unit</code>: (Optional) The unit of the metric.
The unit may be any unit specified as a String or one specified in <a href="../../../../org/eclipse/microprofile/metrics/MetricUnits.html" title="class in org.eclipse.microprofile.metrics"><code>MetricUnits</code></a>.
</li>
<li>
<code>Tags</code>: (Optional) The tags (represented by key/value pairs) of the metric which is augmented by global tags (if available).
Global tags can be set by passing the list of tags in an environment variable <code>MP_METRICS_TAGS</code>.
For example, the following can be used to set the global tags:
<pre><code>
export MP_METRICS_TAGS=app=shop,tier=integration
</code></pre>
</li>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#GLOBAL_TAGS_VARIABLE">GLOBAL_TAGS_VARIABLE</a></span></code>
<div class="block">The environment variable used to pass in global tags.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#Metadata-java.util.Map-">Metadata</a></span>(java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;in)</code>
<div class="block">Constructs a Metadata object from a map with the following keys
<code>name</code> - The name of the metric
<code>displayName</code> - The display (friendly) name of the metric
<code>description</code> - The description of the metric
<code>type</code> - The type of the metric
<code>unit</code> - The units of the metric
<code>tags</code> - The tags of the metric - cannot be null
<code>reusable</code> - If <tt>true</tt>, this metric name is permitted to be used at multiple registration points.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#Metadata-java.lang.String-org.eclipse.microprofile.metrics.MetricType-">Metadata</a></span>(java.lang.String&nbsp;name,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type)</code>
<div class="block">Constructs a Metadata object with default units</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#Metadata-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-">Metadata</a></span>(java.lang.String&nbsp;name,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit)</code>
<div class="block">Constructs a Metadata object</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#Metadata-java.lang.String-java.lang.String-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-">Metadata</a></span>(java.lang.String&nbsp;name,
java.lang.String&nbsp;displayName,
java.lang.String&nbsp;description,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit)</code>
<div class="block">Constructs a Metadata object</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#Metadata-java.lang.String-java.lang.String-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-java.lang.String-">Metadata</a></span>(java.lang.String&nbsp;name,
java.lang.String&nbsp;displayName,
java.lang.String&nbsp;description,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit,
java.lang.String&nbsp;tags)</code>
<div class="block">Constructs a Metadata object</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#addTag-java.lang.String-">addTag</a></span>(java.lang.String&nbsp;kvString)</code>
<div class="block">Add one single tag with the format: 'key=value'.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#addTags-java.lang.String-">addTags</a></span>(java.lang.String&nbsp;tagsString)</code>
<div class="block">Add multiple tags delimited by commas.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getDescription--">getDescription</a></span>()</code>
<div class="block">Returns the description of the metric.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getDisplayName--">getDisplayName</a></span>()</code>
<div class="block">Returns the display name if set, otherwise this method returns the metric name.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getName--">getName</a></span>()</code>
<div class="block">Returns the metric name.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.HashMap&lt;java.lang.String,java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getTags--">getTags</a></span>()</code>
<div class="block">Returns the underlying HashMap containing the tags.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getTagsAsString--">getTagsAsString</a></span>()</code>
<div class="block">Gets the list of tags as a single String in the format 'key="value",key2="value2",...'</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getType--">getType</a></span>()</code>
<div class="block">Returns the String representation of the <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getTypeRaw--">getTypeRaw</a></span>()</code>
<div class="block">Returns the <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a> of the metric</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#getUnit--">getUnit</a></span>()</code>
<div class="block">Returns the unit of the metric.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#isReusable--">isReusable</a></span>()</code>
<div class="block">Can the metric be reused (i.e.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setDescription-java.lang.String-">setDescription</a></span>(java.lang.String&nbsp;description)</code>
<div class="block">Sets the description of the metric.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setDisplayName-java.lang.String-">setDisplayName</a></span>(java.lang.String&nbsp;displayName)</code>
<div class="block">Sets the display name.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setName-java.lang.String-">setName</a></span>(java.lang.String&nbsp;name)</code>
<div class="block">Sets the metric name.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setReusable-boolean-">setReusable</a></span>(boolean&nbsp;reusable)</code>
<div class="block">Set if the metric can be reusable (i.e.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setTags-java.util.HashMap-">setTags</a></span>(java.util.HashMap&lt;java.lang.String,java.lang.String&gt;&nbsp;tags)</code>
<div class="block">Sets the tags hashmap.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setType-org.eclipse.microprofile.metrics.MetricType-">setType</a></span>(<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type)</code>
<div class="block">Sets the type of the metric</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setType-java.lang.String-">setType</a></span>(java.lang.String&nbsp;type)</code>
<div class="block">Sets the metric type using a String representation of <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a>.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#setUnit-java.lang.String-">setUnit</a></span>(java.lang.String&nbsp;unit)</code>
<div class="block">Sets the unit of the metric.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="GLOBAL_TAGS_VARIABLE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GLOBAL_TAGS_VARIABLE</h4>
<pre>public static final&nbsp;java.lang.String GLOBAL_TAGS_VARIABLE</pre>
<div class="block">The environment variable used to pass in global tags.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.eclipse.microprofile.metrics.Metadata.GLOBAL_TAGS_VARIABLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Metadata-java.lang.String-org.eclipse.microprofile.metrics.MetricType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Metadata</h4>
<pre>public&nbsp;Metadata(java.lang.String&nbsp;name,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type)</pre>
<div class="block">Constructs a Metadata object with default units</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the metric</dd>
<dd><code>type</code> - The type of the metric</dd>
</dl>
</li>
</ul>
<a name="Metadata-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Metadata</h4>
<pre>public&nbsp;Metadata(java.lang.String&nbsp;name,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit)</pre>
<div class="block">Constructs a Metadata object</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the metric</dd>
<dd><code>type</code> - The type of the metric</dd>
<dd><code>unit</code> - The units of the metric</dd>
</dl>
</li>
</ul>
<a name="Metadata-java.lang.String-java.lang.String-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Metadata</h4>
<pre>public&nbsp;Metadata(java.lang.String&nbsp;name,
java.lang.String&nbsp;displayName,
java.lang.String&nbsp;description,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit)</pre>
<div class="block">Constructs a Metadata object</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the metric</dd>
<dd><code>displayName</code> - The display (friendly) name of the metric</dd>
<dd><code>description</code> - The description of the metric</dd>
<dd><code>type</code> - The type of the metric</dd>
<dd><code>unit</code> - The units of the metric</dd>
</dl>
</li>
</ul>
<a name="Metadata-java.lang.String-java.lang.String-java.lang.String-org.eclipse.microprofile.metrics.MetricType-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Metadata</h4>
<pre>public&nbsp;Metadata(java.lang.String&nbsp;name,
java.lang.String&nbsp;displayName,
java.lang.String&nbsp;description,
<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type,
java.lang.String&nbsp;unit,
java.lang.String&nbsp;tags)</pre>
<div class="block">Constructs a Metadata object</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the metric</dd>
<dd><code>displayName</code> - The display (friendly) name of the metric</dd>
<dd><code>description</code> - The description of the metric</dd>
<dd><code>type</code> - The type of the metric</dd>
<dd><code>unit</code> - The units of the metric</dd>
<dd><code>tags</code> - The tags of the metric</dd>
</dl>
</li>
</ul>
<a name="Metadata-java.util.Map-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Metadata</h4>
<pre>public&nbsp;Metadata(java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;in)</pre>
<div class="block">Constructs a Metadata object from a map with the following keys
<ul>
<li><code>name</code> - The name of the metric</li>
<li><code>displayName</code> - The display (friendly) name of the metric</li>
<li><code>description</code> - The description of the metric</li>
<li><code>type</code> - The type of the metric</li>
<li><code>unit</code> - The units of the metric</li>
<li><code>tags</code> - The tags of the metric - cannot be null</li>
<li><code>reusable</code> - If <tt>true</tt>, this metric name is permitted to be used at multiple registration points. If
<tt>false</tt>, this metric name is only permitted to be used at one registration point per MetricRegistry.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - a map of key/value pairs representing Metadata</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
<div class="block">Returns the metric name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the metric name.</dd>
</dl>
</li>
</ul>
<a name="setName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setName</h4>
<pre>public&nbsp;void&nbsp;setName(java.lang.String&nbsp;name)</pre>
<div class="block">Sets the metric name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the new metric name</dd>
</dl>
</li>
</ul>
<a name="getDisplayName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDisplayName</h4>
<pre>public&nbsp;java.lang.String&nbsp;getDisplayName()</pre>
<div class="block">Returns the display name if set, otherwise this method returns the metric name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the display name</dd>
</dl>
</li>
</ul>
<a name="setDisplayName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDisplayName</h4>
<pre>public&nbsp;void&nbsp;setDisplayName(java.lang.String&nbsp;displayName)</pre>
<div class="block">Sets the display name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>displayName</code> - the new display name</dd>
</dl>
</li>
</ul>
<a name="getDescription--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDescription</h4>
<pre>public&nbsp;java.lang.String&nbsp;getDescription()</pre>
<div class="block">Returns the description of the metric.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the description</dd>
</dl>
</li>
</ul>
<a name="setDescription-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDescription</h4>
<pre>public&nbsp;void&nbsp;setDescription(java.lang.String&nbsp;description)</pre>
<div class="block">Sets the description of the metric.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>description</code> - the new description</dd>
</dl>
</li>
</ul>
<a name="getType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre>public&nbsp;java.lang.String&nbsp;getType()</pre>
<div class="block">Returns the String representation of the <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the MetricType as a String</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a></dd>
</dl>
</li>
</ul>
<a name="getTypeRaw--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTypeRaw</h4>
<pre>public&nbsp;<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;getTypeRaw()</pre>
<div class="block">Returns the <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a> of the metric</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a></dd>
</dl>
</li>
</ul>
<a name="setType-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setType</h4>
<pre>public&nbsp;void&nbsp;setType(java.lang.String&nbsp;type)
throws java.lang.IllegalArgumentException</pre>
<div class="block">Sets the metric type using a String representation of <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the new metric type</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the String is not a valid <a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics"><code>MetricType</code></a></dd>
</dl>
</li>
</ul>
<a name="setType-org.eclipse.microprofile.metrics.MetricType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setType</h4>
<pre>public&nbsp;void&nbsp;setType(<a href="../../../../org/eclipse/microprofile/metrics/MetricType.html" title="enum in org.eclipse.microprofile.metrics">MetricType</a>&nbsp;type)</pre>
<div class="block">Sets the type of the metric</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the new metric type</dd>
</dl>
</li>
</ul>
<a name="getUnit--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnit</h4>
<pre>public&nbsp;java.lang.String&nbsp;getUnit()</pre>
<div class="block">Returns the unit of the metric.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the unit</dd>
</dl>
</li>
</ul>
<a name="setUnit-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUnit</h4>
<pre>public&nbsp;void&nbsp;setUnit(java.lang.String&nbsp;unit)</pre>
<div class="block">Sets the unit of the metric.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unit</code> - the new unit</dd>
</dl>
</li>
</ul>
<a name="isReusable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReusable</h4>
<pre>public&nbsp;boolean&nbsp;isReusable()</pre>
<div class="block">Can the metric be reused (i.e. same name registered multiple times)?</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if reusable, false otherwise</dd>
</dl>
</li>
</ul>
<a name="setReusable-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReusable</h4>
<pre>public&nbsp;void&nbsp;setReusable(boolean&nbsp;reusable)</pre>
<div class="block">Set if the metric can be reusable (i.e. same name registered multiple times)?</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reusable</code> - True if reusable, false otherwise</dd>
</dl>
</li>
</ul>
<a name="getTagsAsString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTagsAsString</h4>
<pre>public&nbsp;java.lang.String&nbsp;getTagsAsString()</pre>
<div class="block">Gets the list of tags as a single String in the format 'key="value",key2="value2",...'</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the tags</dd>
</dl>
</li>
</ul>
<a name="getTags--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTags</h4>
<pre>public&nbsp;java.util.HashMap&lt;java.lang.String,java.lang.String&gt;&nbsp;getTags()</pre>
<div class="block">Returns the underlying HashMap containing the tags.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a hashmap of tags</dd>
</dl>
</li>
</ul>
<a name="addTag-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addTag</h4>
<pre>public&nbsp;void&nbsp;addTag(java.lang.String&nbsp;kvString)</pre>
<div class="block">Add one single tag with the format: 'key=value'. If the input is empty or does
not contain a '=' sign, the entry is ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>kvString</code> - Input string</dd>
</dl>
</li>
</ul>
<a name="addTags-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addTags</h4>
<pre>public&nbsp;void&nbsp;addTags(java.lang.String&nbsp;tagsString)</pre>
<div class="block">Add multiple tags delimited by commas.
The format must be in the form 'key1=value1, key2=value2'.
This method will call <a href="../../../../org/eclipse/microprofile/metrics/Metadata.html#addTag-java.lang.String-"><code>addTag(String)</code></a> on each tag.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tagsString</code> - a string containing multiple tags</dd>
</dl>
</li>
</ul>
<a name="setTags-java.util.HashMap-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTags</h4>
<pre>public&nbsp;void&nbsp;setTags(java.util.HashMap&lt;java.lang.String,java.lang.String&gt;&nbsp;tags)</pre>
<div class="block">Sets the tags hashmap.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tags</code> - a hashmap containing tags.</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/microprofile/metrics/Histogram.html" title="interface in org.eclipse.microprofile.metrics"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/microprofile/metrics/Meter.html" title="interface in org.eclipse.microprofile.metrics"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/microprofile/metrics/Metadata.html" target="_top">Frames</a></li>
<li><a href="Metadata.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>