blob: 2ea82cc8920cb58100781658ac49c6a986ce8e66 [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>
<!-- Generated by javadoc (1.8.0_161-google-v7) on Thu Oct 18 16:14:34 PDT 2018 -->
<title>CustomCoder (Apache Beam 2.8.0-SNAPSHOT)</title>
<meta name="date" content="2018-10-18">
<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="CustomCoder (Apache Beam 2.8.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":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/apache/beam/sdk/coders/CollectionCoder.html" title="class in org.apache.beam.sdk.coders"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/coders/DefaultCoder.html" title="annotation in org.apache.beam.sdk.coders"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/coders/CustomCoder.html" target="_top">Frames</a></li>
<li><a href="CustomCoder.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><a href="#nested.classes.inherited.from.class.org.apache.beam.sdk.coders.Coder">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&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.apache.beam.sdk.coders</div>
<h2 title="Class CustomCoder" class="title">Class CustomCoder&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">org.apache.beam.sdk.coders.Coder</a>&lt;T&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.coders.CustomCoder&lt;T&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of values being encoded and decoded</dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/beam/sdk/io/amqp/AmqpMessageCoder.html" title="class in org.apache.beam.sdk.io.amqp">AmqpMessageCoder</a>, <a href="../../../../../org/apache/beam/sdk/extensions/sketching/ApproximateDistinct.HyperLogLogPlusCoder.html" title="class in org.apache.beam.sdk.extensions.sketching">ApproximateDistinct.HyperLogLogPlusCoder</a>, <a href="../../../../../org/apache/beam/sdk/coders/AvroCoder.html" title="class in org.apache.beam.sdk.coders">AvroCoder</a>, <a href="../../../../../org/apache/beam/sdk/extensions/sql/impl/transform/BeamAggregationTransforms.AggregationAccumulatorCoder.html" title="class in org.apache.beam.sdk.extensions.sql.impl.transform">BeamAggregationTransforms.AggregationAccumulatorCoder</a>, <a href="../../../../../org/apache/beam/sdk/transforms/join/CoGbkResult.CoGbkResultCoder.html" title="class in org.apache.beam.sdk.transforms.join">CoGbkResult.CoGbkResultCoder</a>, <a href="../../../../../org/apache/beam/sdk/coders/DelegateCoder.html" title="class in org.apache.beam.sdk.coders">DelegateCoder</a>, <a href="../../../../../org/apache/beam/sdk/io/xml/JAXBCoder.html" title="class in org.apache.beam.sdk.io.xml">JAXBCoder</a>, <a href="../../../../../org/apache/beam/sdk/extensions/protobuf/ProtoCoder.html" title="class in org.apache.beam.sdk.extensions.protobuf">ProtoCoder</a>, <a href="../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubMessagePayloadOnlyCoder.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubMessagePayloadOnlyCoder</a>, <a href="../../../../../org/apache/beam/sdk/io/gcp/pubsub/PubsubMessageWithAttributesCoder.html" title="class in org.apache.beam.sdk.io.gcp.pubsub">PubsubMessageWithAttributesCoder</a>, <a href="../../../../../org/apache/beam/sdk/coders/RowCoder.html" title="class in org.apache.beam.sdk.coders">RowCoder</a>, <a href="../../../../../org/apache/beam/sdk/schemas/SchemaCoder.html" title="class in org.apache.beam.sdk.schemas">SchemaCoder</a>, <a href="../../../../../org/apache/beam/sdk/coders/SerializableCoder.html" title="class in org.apache.beam.sdk.coders">SerializableCoder</a>, <a href="../../../../../org/apache/beam/sdk/coders/StringDelegateCoder.html" title="class in org.apache.beam.sdk.coders">StringDelegateCoder</a>, <a href="../../../../../org/apache/beam/sdk/io/hadoop/WritableCoder.html" title="class in org.apache.beam.sdk.io.hadoop">WritableCoder</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">CustomCoder&lt;T&gt;</span>
extends <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;T&gt;
implements java.io.Serializable</pre>
<div class="block">An abstract base class that implements all methods of <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a> except <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#encode-T-java.io.OutputStream-"><code>Coder.encode(T, java.io.OutputStream)</code></a>
and <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#decode-java.io.InputStream-"><code>Coder.decode(java.io.InputStream)</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.beam.sdk.coders.CustomCoder">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.coders.Coder">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.beam.sdk.coders.<a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/coders/Coder.Context.html" title="class in org.apache.beam.sdk.coders">Coder.Context</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.NonDeterministicException.html" title="class in org.apache.beam.sdk.coders">Coder.NonDeterministicException</a></code></li>
</ul>
</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/apache/beam/sdk/coders/CustomCoder.html#CustomCoder--">CustomCoder</a></span>()</code>&nbsp;</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>java.util.List&lt;? extends <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;?&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/coders/CustomCoder.html#getCoderArguments--">getCoderArguments</a></span>()</code>
<div class="block">If this is a <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a> for a parameterized type, returns the list of <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a>s being
used for each of the parameters in the same order they appear within the parameterized type's
type signature.</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/apache/beam/sdk/coders/CustomCoder.html#verifyDeterministic--">verifyDeterministic</a></span>()</code>
<div class="block">Throw <a href="../../../../../org/apache/beam/sdk/coders/Coder.NonDeterministicException.html" title="class in org.apache.beam.sdk.coders"><code>Coder.NonDeterministicException</code></a> if the coding is not deterministic.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.coders.Coder">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.coders.<a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html#consistentWithEquals--">consistentWithEquals</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#decode-java.io.InputStream-">decode</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#decode-java.io.InputStream-org.apache.beam.sdk.coders.Coder.Context-">decode</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#encode-T-java.io.OutputStream-">encode</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#encode-T-java.io.OutputStream-org.apache.beam.sdk.coders.Coder.Context-">encode</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#getEncodedElementByteSize-T-">getEncodedElementByteSize</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#getEncodedTypeDescriptor--">getEncodedTypeDescriptor</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#isRegisterByteSizeObserverCheap-T-">isRegisterByteSizeObserverCheap</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#registerByteSizeObserver-T-org.apache.beam.sdk.util.common.ElementByteSizeObserver-">registerByteSizeObserver</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#structuralValue-T-">structuralValue</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic-org.apache.beam.sdk.coders.Coder-java.lang.String-org.apache.beam.sdk.coders.Coder...-">verifyDeterministic</a>, <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic-org.apache.beam.sdk.coders.Coder-java.lang.String-java.lang.Iterable-">verifyDeterministic</a></code></li>
</ul>
<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, hashCode, notify, notifyAll, toString, 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="CustomCoder--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CustomCoder</h4>
<pre>public&nbsp;CustomCoder()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getCoderArguments--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCoderArguments</h4>
<pre>public&nbsp;java.util.List&lt;? extends <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;?&gt;&gt;&nbsp;getCoderArguments()</pre>
<div class="block">If this is a <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a> for a parameterized type, returns the list of <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a>s being
used for each of the parameters in the same order they appear within the parameterized type's
type signature. If this cannot be done, or this <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>Coder</code></a> does not encode/decode a
parameterized type, returns the empty list..
<p>Returns an empty list. A <a href="../../../../../org/apache/beam/sdk/coders/CustomCoder.html" title="class in org.apache.beam.sdk.coders"><code>CustomCoder</code></a> has no default argument <a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders"><code>coders</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html#getCoderArguments--">getCoderArguments</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../org/apache/beam/sdk/coders/CustomCoder.html" title="type parameter in CustomCoder">T</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="verifyDeterministic--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>verifyDeterministic</h4>
<pre>public&nbsp;void&nbsp;verifyDeterministic()
throws <a href="../../../../../org/apache/beam/sdk/coders/Coder.NonDeterministicException.html" title="class in org.apache.beam.sdk.coders">Coder.NonDeterministicException</a></pre>
<div class="block">Throw <a href="../../../../../org/apache/beam/sdk/coders/Coder.NonDeterministicException.html" title="class in org.apache.beam.sdk.coders"><code>Coder.NonDeterministicException</code></a> if the coding is not deterministic.
<p>In order for a <code>Coder</code> to be considered deterministic, the following must be true:
<ul>
<li>two values that compare as equal (via <code>Object.equals()</code> or <code>Comparable.compareTo()</code>, if supported) have the same encoding.
<li>the <code>Coder</code> always produces a canonical encoding, which is the same for an instance
of an object even if produced on different computers at different times.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--">verifyDeterministic</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../org/apache/beam/sdk/coders/CustomCoder.html" title="type parameter in CustomCoder">T</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>NonDeterministicException</code> - a <a href="../../../../../org/apache/beam/sdk/coders/CustomCoder.html" title="class in org.apache.beam.sdk.coders"><code>CustomCoder</code></a> is presumed nondeterministic.</dd>
<dd><code><a href="../../../../../org/apache/beam/sdk/coders/Coder.NonDeterministicException.html" title="class in org.apache.beam.sdk.coders">Coder.NonDeterministicException</a></code> - if this coder is not deterministic.</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/apache/beam/sdk/coders/CollectionCoder.html" title="class in org.apache.beam.sdk.coders"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/coders/DefaultCoder.html" title="annotation in org.apache.beam.sdk.coders"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/coders/CustomCoder.html" target="_top">Frames</a></li>
<li><a href="CustomCoder.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><a href="#nested.classes.inherited.from.class.org.apache.beam.sdk.coders.Coder">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&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>