| Current File : //usr/share/lib/java/javadoc/dtrace/api/org/opensolaris/os/dtrace/Aggregation.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Aggregation</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="Aggregation";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":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="../../../../org/opensolaris/os/dtrace/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Aggregation.html">Use</a></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/opensolaris/os/dtrace/Aggregate.html" title="class in org.opensolaris.os.dtrace"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/opensolaris/os/dtrace/Aggregation.html" target="_top">Frames</a></li>
<li><a href="Aggregation.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </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.opensolaris.os.dtrace</div>
<h2 title="Class Aggregation" class="title">Class Aggregation</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.opensolaris.os.dtrace.Aggregation</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">Aggregation</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">A snapshot of a DTrace aggregation. The name of an <code>Aggregation</code> instance matches the source declaration, for example
<pre> <code> @a[execname] = count();</code></pre>
results in an <code>Aggregation</code> named "a" (the name does not
include the preceding <code>@</code>). For convenience, a single
aggregation can remain unnamed (multiple aggregations in the same D
program need distinct names). The unnamed aggregation results in an
<code>Aggregation</code> instance whose name is the empty string, for
example
<pre> <code> @[execname] = count();</code></pre>
An aggregation can list more than one variable in square brackets in
order to accumulate a value for each unique combination, or <a href="../../../../org/opensolaris/os/dtrace/Tuple.html" title="class in org.opensolaris.os.dtrace"><code>Tuple</code></a>. Each tuple instance is associated with its accumulated
<a href="../../../../org/opensolaris/os/dtrace/AggregationValue.html" title="interface in org.opensolaris.os.dtrace"><code>AggregationValue</code></a> in an <a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace"><code>AggregationRecord</code></a>. For
example
<pre> <code> @counts[execname, probefunc, cpu] = count();</code></pre>
results in an <code>Aggregation</code> named "counts" containing records
each pairing a <a href="../../../../org/opensolaris/os/dtrace/CountValue.html" title="class in org.opensolaris.os.dtrace"><code>CountValue</code></a> to a three-element <code>Tuple</code>.
It is also possible to omit the square brackets, for example
<pre> <code> @a = count();</code></pre>
results in an <code>Aggregation</code> named "a" with only a single record
keyed to the empty tuple (<a href="../../../../org/opensolaris/os/dtrace/Tuple.html#EMPTY"><code>Tuple.EMPTY</code></a>).
<p>
For more information, see the <a
href=http://docs.sun.com/app/docs/doc/817-6223/6mlkidlh7?a=view>
<b>Aggregations</b></a> chapter of the <i>Solaris Dynamic Tracing
Guide</i>. Also, the <a
href=http://docs.sun.com/app/docs/doc/817-6223/6mlkidlfv?a=view>
<b>Built-in Variables</b></a> section of the <b>Variables</b> chapter
describes variables like <code>execname</code>, <code>probefunc</code>, and
<code>cpu</code> useful for aggregating.
<p>
Immutable. Supports persistence using <code>XMLEncoder</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/opensolaris/os/dtrace/Aggregate.html" title="class in org.opensolaris.os.dtrace"><code>Aggregate</code></a>,
<a href="../../../../org/opensolaris/os/dtrace/PrintaRecord.html" title="class in org.opensolaris.os.dtrace"><code>PrintaRecord</code></a>,
<a href="../../../../serialized-form.html#org.opensolaris.os.dtrace.Aggregation">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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"> </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/opensolaris/os/dtrace/Aggregation.html#Aggregation-java.lang.String-long-java.util.Collection-">Aggregation</a></span>(java.lang.String aggregationName,
long aggregationID,
java.util.Collection<<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>> aggregationRecords)</code>
<div class="block">Creates an aggregation with the given name, ID, and records.</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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>java.util.Map<<a href="../../../../org/opensolaris/os/dtrace/Tuple.html" title="class in org.opensolaris.os.dtrace">Tuple</a>,<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#asMap--">asMap</a></span>()</code>
<div class="block">Gets a read-only <code>Map</code> view of this aggregation.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object o)</code>
<div class="block">Compares the specified object with this aggregation for equality.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#getID--">getID</a></span>()</code>
<div class="block">Gets the D compiler-generated ID of this aggregation.</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/opensolaris/os/dtrace/Aggregation.html#getName--">getName</a></span>()</code>
<div class="block">Gets the name of this aggregation.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#getRecord-org.opensolaris.os.dtrace.Tuple-">getRecord</a></span>(<a href="../../../../org/opensolaris/os/dtrace/Tuple.html" title="class in org.opensolaris.os.dtrace">Tuple</a> key)</code>
<div class="block">Gets the record associated with the given key, or the singleton
record of an aggregation declared without square brackets if
<code>key</code> is <code>null</code> or empty.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.List<<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#getRecords--">getRecords</a></span>()</code>
<div class="block">Gets an unordered list of this aggregation's records.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#hashCode--">hashCode</a></span>()</code>
<div class="block">Overridden to ensure that equal aggregations have equal hash
codes.</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/opensolaris/os/dtrace/Aggregation.html#toString--">toString</a></span>()</code>
<div class="block">Gets a string representation of this aggregation useful for
logging and not intended for display.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Aggregation-java.lang.String-long-java.util.Collection-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Aggregation</h4>
<pre>public Aggregation(java.lang.String aggregationName,
long aggregationID,
java.util.Collection<<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>> aggregationRecords)</pre>
<div class="block">Creates an aggregation with the given name, ID, and records.
Supports XML persistence.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>aggregationName</code> - the name of this aggregation, empty string
if this aggregation is unnamed</dd>
<dd><code>aggregationID</code> - ID generated from a sequence by the native
DTrace library</dd>
<dd><code>aggregationRecords</code> - unordered collection of records
belonging to this aggregation</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the specified name or list of
records is <code>null</code></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if any record has an empty
tuple, unless it is the only record in the given collection (only
a singleton generated by an aggregation without square brackets
uses <a href="../../../../org/opensolaris/os/dtrace/Tuple.html#EMPTY"><code>Tuple.EMPTY</code></a> as a key)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#getRecord-org.opensolaris.os.dtrace.Tuple-"><code>getRecord(Tuple key)</code></a></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 java.lang.String getName()</pre>
<div class="block">Gets the name of this aggregation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of this aggregation exactly as it appears in the
D program minus the preceding <code>@</code>, or an empty string if
the aggregation is unnamed, for example:
<pre> <code> @[execname] = count();</code></pre></dd>
</dl>
</li>
</ul>
<a name="getID--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getID</h4>
<pre>public long getID()</pre>
<div class="block">Gets the D compiler-generated ID of this aggregation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the D compiler-generated ID</dd>
</dl>
</li>
</ul>
<a name="getRecords--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecords</h4>
<pre>public java.util.List<<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>> getRecords()</pre>
<div class="block">Gets an unordered list of this aggregation's records. The list is
sortable using <code>Collections.sort(List list,
Comparator c)</code> with any user-defined ordering. Modifying the
returned list has no effect on this aggregation. Supports XML
persistence.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a newly created list that copies this aggregation's
records by reference in no particular order</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/opensolaris/os/dtrace/Aggregate.html#getRecords--"><code>Aggregate.getRecords()</code></a>,
<a href="../../../../org/opensolaris/os/dtrace/Aggregate.html#getOrderedRecords--"><code>Aggregate.getOrderedRecords()</code></a></dd>
</dl>
</li>
</ul>
<a name="asMap--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asMap</h4>
<pre>public java.util.Map<<a href="../../../../org/opensolaris/os/dtrace/Tuple.html" title="class in org.opensolaris.os.dtrace">Tuple</a>,<a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a>> asMap()</pre>
<div class="block">Gets a read-only <code>Map</code> view of this aggregation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read-only <code>Map</code> view of this aggregation</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object o)</pre>
<div class="block">Compares the specified object with this aggregation for equality.
Defines equality as having equal names and equal records.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if and only if the specified object is an
<code>Aggregation</code> with the same name as this aggregation and
the <code>Map</code> views of both aggregations returned by <a href="../../../../org/opensolaris/os/dtrace/Aggregation.html#asMap--"><code>asMap()</code></a> are equal as defined by <code>AbstractMap.equals()</code></dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<div class="block">Overridden to ensure that equal aggregations have equal hash
codes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="getRecord-org.opensolaris.os.dtrace.Tuple-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecord</h4>
<pre>public <a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace">AggregationRecord</a> getRecord(<a href="../../../../org/opensolaris/os/dtrace/Tuple.html" title="class in org.opensolaris.os.dtrace">Tuple</a> key)</pre>
<div class="block">Gets the record associated with the given key, or the singleton
record of an aggregation declared without square brackets if
<code>key</code> is <code>null</code> or empty.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The record key, or an empty tuple (see <a href="../../../../org/opensolaris/os/dtrace/Tuple.html#EMPTY"><code>Tuple.EMPTY</code></a>) to obtain the value from a <i>singleton</i> (a
non-keyed instance with only a single value) generated from a
DTrace aggregation declarated without square brackets, for
example:
<pre> <code> @a = count();</code></pre></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the record associated with the given key, or <code>null</code>
if no record in this aggregation is associated with the given key</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<div class="block">Gets a string representation of this aggregation useful for
logging and not intended for display. The exact details of the
representation are unspecified and subject to change, but the
following format may be regarded as typical:
<pre><code>
class-name[property1 = value1, property2 = value2]
</code></pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code> in class <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="../../../../org/opensolaris/os/dtrace/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Aggregation.html">Use</a></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/opensolaris/os/dtrace/Aggregate.html" title="class in org.opensolaris.os.dtrace"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/opensolaris/os/dtrace/AggregationRecord.html" title="class in org.opensolaris.os.dtrace"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/opensolaris/os/dtrace/Aggregation.html" target="_top">Frames</a></li>
<li><a href="Aggregation.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>