api-docs/0.6/kafka/utils/Utils$.html (861 lines of code) (raw):
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Scaladoc for kafka.utils.Utils</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../../lib/jquery.js"></script>
<link href="../../lib/template.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="../../lib/template.js"></script>
<script type="text/javascript" src="../../lib/tools.tooltip.js"></script>
</head>
<body class="value">
<p id="owner"><a href="../package.html" class="extype" name="kafka">kafka</a>.<a href="package.html" class="extype" name="kafka.utils">utils</a></p>
<div id="definition">
<img src="../../lib/object_big.png" />
<h1>Utils</h1>
</div>
<h4 class="signature" id="signature">
<span class="kind">object</span>
<span class="symbol">
<span class="name">Utils</span><span class="result"> extends AnyRef</span>
</span>
</h4>
<div class="fullcomment" id="comment"><div class="comment cmt"><p>Helper functions!
</p></div>
</div>
<div id="template">
<div id="mbrsel">
<div id="ancestors">
<span class="filtertype">Inherited</span>
<ol><li class="hideall">Hide All</li><li class="showall">Show all</li></ol>
<ol id="linearization"><li class="in" name="scala.AnyRef">AnyRef</li><li class="in" name="scala.Any">Any</li></ol>
</div>
<div id="visbl">
<span class="filtertype">Visibility</span>
<ol><li class="public in">Public</li><li class="all out">All</li></ol>
</div>
</div>
<div class="members" id="values">
<h3>Value Members</h3>
<ol><li visbl="pub" name="scala.AnyRef#!=">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">!=</span><span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="scala.Any#!=">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt"><code>o != arg0</code> is the same as <code>!(o == (arg0))</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p><code>o != arg0</code> is the same as <code>!(o == (arg0))</code>.
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for dis-equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>false</code> if the receiver object is equivalent to the argument; <code>true</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: Any
</div>
</div>
</li><li visbl="pub" name="scala.AnyRef###">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef → Any
</div></div>
</li><li visbl="pub" name="scala.AnyRef#$asInstanceOf">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">$asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">()</span><span class="result">: T0</span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="scala.AnyRef#$isInstanceOf">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">$isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="scala.AnyRef#==">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">==</span><span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt"><code>o == arg0</code> is the same as <code>if (o eq null) arg0 eq null else o.equals(arg0)</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p><code>o == arg0</code> is the same as <code>if (o eq null) arg0 eq null else o.equals(arg0)</code>.
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="scala.Any#==">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt"><code>o == arg0</code> is the same as <code>o.equals(arg0)</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p><code>o == arg0</code> is the same as <code>o.equals(arg0)</code>.
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: Any
</div>
</div>
</li><li visbl="pub" name="scala.Any#asInstanceOf">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: T0</span>
</span>
</h4>
<p class="shortcomment cmt">This method is used to cast the receiver object to be of type <code>T0</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p>This method is used to cast the receiver object to be of type <code>T0</code>.</p><p>Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression<code>1.asInstanceOf[String]</code> will throw a <code>ClassCastException</code> at runtime, while the expression<code>List(1).asInstanceOf[List[String]]</code> will not. In the latter example, because the type argument is erased as
part of compilation it is not possible to check whether the contents of the list are of the requested typed.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>the receiver object.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: Any
</div>
</div>
</li><li visbl="prt" name="scala.AnyRef#clone">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">clone</span><span class="params">()</span><span class="result">: AnyRef</span>
</span>
</h4>
<p class="shortcomment cmt">This method creates and returns a copy of the receiver object.</p>
<div class="fullcomment"><div class="comment cmt"><p>This method creates and returns a copy of the receiver object.</p><p>The default implementation of the <code>clone</code> method is platform dependent.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>a copy of the receiver object.</p></dd></dl><div class="block">
attributes: protected
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#crc32">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">crc32</span><span class="params">(<span name="bytes">bytes: <span class="extype" name="scala.Array">Array</span>[<span class="extype" name="scala.Byte">Byte</span>]</span>, <span name="offset">offset: <span class="extype" name="scala.Int">Int</span></span>, <span name="size">size: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Long">Long</span></span>
</span>
</h4>
<p class="shortcomment cmt">Compute the CRC32 of the segment of the byte array given by the specificed size and offset</p>
<div class="fullcomment"><div class="comment cmt"><p>Compute the CRC32 of the segment of the byte array given by the specificed size and offset</p></div><dl class="paramcmts block"><dt class="param">bytes</dt><dd class="cmt"><p>The bytes to checksum</p></dd><dt class="param">offset</dt><dd class="cmt"><p>the offset at which to begin checksumming</p></dd><dt class="param">size</dt><dd class="cmt"><p>the number of bytes to checksum</p></dd><dt>returns</dt><dd class="cmt"><p>The CRC32
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#crc32">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">crc32</span><span class="params">(<span name="bytes">bytes: <span class="extype" name="scala.Array">Array</span>[<span class="extype" name="scala.Byte">Byte</span>]</span>)</span><span class="result">: <span class="extype" name="scala.Long">Long</span></span>
</span>
</h4>
<p class="shortcomment cmt">Compute the CRC32 of the byte array</p>
<div class="fullcomment"><div class="comment cmt"><p>Compute the CRC32 of the byte array</p></div><dl class="paramcmts block"><dt class="param">bytes</dt><dd class="cmt"><p>The array to compute the checksum for</p></dd><dt>returns</dt><dd class="cmt"><p>The CRC32
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#croak">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">croak</span><span class="params">(<span name="message">message: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Print an error message and shutdown the JVM</p>
<div class="fullcomment"><div class="comment cmt"><p>Print an error message and shutdown the JVM</p></div><dl class="paramcmts block"><dt class="param">message</dt><dd class="cmt"><p>The error message
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#daemonThread">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">daemonThread</span><span class="params">(<span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="fun">fun: () ⇒ <span class="extype" name="scala.Unit">Unit</span></span>)</span><span class="result">: <span class="extype" name="java.lang.Thread">Thread</span></span>
</span>
</h4>
<p class="shortcomment cmt">Create a daemon thread</p>
<div class="fullcomment"><div class="comment cmt"><p>Create a daemon thread</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>The name of the thread</p></dd><dt class="param">fun</dt><dd class="cmt"><p>The runction to execute in the thread</p></dd><dt>returns</dt><dd class="cmt"><p>The unstarted thread
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#daemonThread">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">daemonThread</span><span class="params">(<span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="runnable">runnable: <span class="extype" name="java.lang.Runnable">Runnable</span></span>)</span><span class="result">: <span class="extype" name="java.lang.Thread">Thread</span></span>
</span>
</h4>
<p class="shortcomment cmt">Create a daemon thread</p>
<div class="fullcomment"><div class="comment cmt"><p>Create a daemon thread</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>The name of the thread</p></dd><dt class="param">runnable</dt><dd class="cmt"><p>The runnable to execute in the background</p></dd><dt>returns</dt><dd class="cmt"><p>The unstarted thread
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#eq">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">eq</span><span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt">This method is used to test whether the argument (<code>arg0</code>) is a reference to the
receiver object (<code>this</code>).</p>
<div class="fullcomment"><div class="comment cmt"><p>This method is used to test whether the argument (<code>arg0</code>) is a reference to the
receiver object (<code>this</code>).</p><p>The <code>eq</code> method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on
non-null instances of <code>AnyRef</code>:
* It is reflexive: for any non-null instance <code>x</code> of type <code>AnyRef</code>, <code>x.eq(x)</code> returns <code>true</code>.
* It is symmetric: for any non-null instances <code>x</code> and <code>y</code> of type <code>AnyRef</code>, <code>x.eq(y)</code> returns <code>true</code> if and
only if <code>y.eq(x)</code> returns <code>true</code>.
* It is transitive: for any non-null instances <code>x</code>, <code>y</code>, and <code>z</code> of type <code>AnyRef</code> if <code>x.eq(y)</code> returns <code>true</code> and <code>y.eq(z)</code> returns <code>true</code>, then <code>x.eq(z)</code> returns <code>true</code>.</p><p>Additionally, the <code>eq</code> method has three other properties.
* It is consistent: for any non-null instances <code>x</code> and <code>y</code> of type <code>AnyRef</code>, multiple invocations of
<code>x.eq(y)</code> consistently returns <code>true</code> or consistently returns <code>false</code>.
* For any non-null instance <code>x</code> of type <code>AnyRef</code>, <code>x.eq(null)</code> and <code>null.eq(x)</code> returns <code>false</code>.
* <code>null.eq(null)</code> returns <code>true</code>.</p><p>When overriding the <code>equals</code> or <code>hashCode</code> methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (<code>o1 eq o2</code>), they
should be equal to each other (<code>o1 == o2</code>) and they should hash to the same value (<code>o1.hashCode == o2.hashCode</code>).
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for reference equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the argument is a reference to the receiver object; <code>false</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#equal">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">equal</span><span class="params">(<span name="b1">b1: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="b2">b2: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt">Test if two byte buffers are equal.</p>
<div class="fullcomment"><div class="comment cmt"><p>Test if two byte buffers are equal. In this case equality means having
the same bytes from the current position to the limit
</p></div>
</div>
</li><li visbl="pub" name="scala.AnyRef#equals">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt">This method is used to compare the receiver object (<code>this</code>) with the argument object (<code>arg0</code>) for equivalence.</p>
<div class="fullcomment"><div class="comment cmt"><p>This method is used to compare the receiver object (<code>this</code>) with the argument object (<code>arg0</code>) for equivalence.</p><p>The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence
relation]:
* It is reflexive: for any instance <code>x</code> of type <code>Any</code>, <code>x.equals(x)</code> should return <code>true</code>.
* It is symmetric: for any instances <code>x</code> and <code>y</code> of type <code>Any</code>, <code>x.equals(y)</code> should return <code>true</code> if and
only if <code>y.equals(x)</code> returns <code>true</code>.
* It is transitive: for any instances <code>x</code>, <code>y</code>, and <code>z</code> of type <code>AnyRef</code> if <code>x.equals(y)</code> returns <code>true</code> and
<code>y.equals(z)</code> returns <code>true</code>, then <code>x.equals(z)</code> should return <code>true</code>.</p><p>If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to override <code>hashCode</code> to ensure that objects
that are "equal" (<code>o1.equals(o2)</code> returns <code>true</code>) hash to the same
scala.Int
(<code>o1.hashCode.equals(o2.hashCode)</code>).
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise.</p></dd></dl><div class="block">
definition classes: AnyRef → Any
</div>
</div>
</li><li visbl="prt" name="scala.AnyRef#finalize">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">This method is called by the garbage collector on the receiver object when garbage collection determines that
there are no more references to the object.</p>
<div class="fullcomment"><div class="comment cmt"><p>This method is called by the garbage collector on the receiver object when garbage collection determines that
there are no more references to the object.</p><p>The details of when and if the <code>finalize</code> method are invoked, as well as the interaction between <code>finalize</code>and non-local returns and exceptions, are all platform dependent.</p></div><div class="block">
attributes: protected
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getBoolean">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getBoolean</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="default">default: <span class="extype" name="scala.Boolean">Boolean</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read a boolean value from the properties instance</p>
<div class="fullcomment"><div class="comment cmt"><p>Read a boolean value from the properties instance</p></div><dl class="paramcmts block"><dt class="param">props</dt><dd class="cmt"><p>The properties to read from</p></dd><dt class="param">name</dt><dd class="cmt"><p>The property name</p></dd><dt class="param">default</dt><dd class="cmt"><p>The default value to use if the property is not found</p></dd><dt>returns</dt><dd class="cmt"><p>the boolean value
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#getClass">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getClass</span><span class="params">()</span><span class="result">: java.lang.Class[_]</span>
</span>
</h4>
<p class="shortcomment cmt">Returns a representation that corresponds to the dynamic class of the receiver object.</p>
<div class="fullcomment"><div class="comment cmt"><p>Returns a representation that corresponds to the dynamic class of the receiver object.</p><p>The nature of the representation is platform dependent.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>a representation that corresponds to the dynamic class of the receiver object.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getConsumerTopicMap">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getConsumerTopicMap</span><span class="params">(<span name="consumerTopicString">consumerTopicString: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.collection.Map">Map</span>[<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>]</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getHostPort">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getHostPort</span><span class="params">(<span name="hostport">hostport: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: (<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>)</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getInt</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="default">default: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read an integer from the properties instance</p>
<div class="fullcomment"><div class="comment cmt"><p>Read an integer from the properties instance</p></div><dl class="paramcmts block"><dt class="param">props</dt><dd class="cmt"><p>The properties to read from</p></dd><dt class="param">name</dt><dd class="cmt"><p>The property name</p></dd><dt class="param">default</dt><dd class="cmt"><p>The default value to use if the property is not found</p></dd><dt>returns</dt><dd class="cmt"><p>the integer value
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getInt</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read a required integer property value or throw an exception if no such property is found
</p>
<div class="fullcomment"><div class="comment cmt"><p>Read a required integer property value or throw an exception if no such property is found
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getIntInRange">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getIntInRange</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="default">default: <span class="extype" name="scala.Int">Int</span></span>, <span name="range">range: (<span class="extype" name="scala.Int">Int</span>, <span class="extype" name="scala.Int">Int</span>)</span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read an integer from the properties instance.</p>
<div class="fullcomment"><div class="comment cmt"><p>Read an integer from the properties instance. Throw an exception
if the value is not in the given range (inclusive)</p></div><dl class="paramcmts block"><dt class="param">props</dt><dd class="cmt"><p>The properties to read from</p></dd><dt class="param">name</dt><dd class="cmt"><p>The property name</p></dd><dt class="param">default</dt><dd class="cmt"><p>The default value to use if the property is not found</p></dd><dt class="param">range</dt><dd class="cmt"><p>The range in which the value must fall (inclusive)</p></dd><dt>returns</dt><dd class="cmt"><p>the integer value
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getObject">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getObject</span><span class="tparams">[<span name="T">T <: AnyRef</span>]</span><span class="params">(<span name="className">className: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: T</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getProps">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getProps</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="default">default: <span class="extype" name="java.util.Properties">Properties</span></span>)</span><span class="result">: <span class="extype" name="java.util.Properties">Properties</span></span>
</span>
</h4>
<p class="shortcomment cmt">Get a property of type java.</p>
<div class="fullcomment"><div class="comment cmt"><p>Get a property of type java.util.Properties or return the default if no such property is defined
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getProps">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getProps</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.util.Properties">Properties</span></span>
</span>
</h4>
<p class="shortcomment cmt">Get a property of type java.</p>
<div class="fullcomment"><div class="comment cmt"><p>Get a property of type java.util.Properties or throw and exception if no such property is defined.
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getString</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<p class="shortcomment cmt">Get a string property or throw and exception if no such property is defined.</p>
<div class="fullcomment"><div class="comment cmt"><p>Get a string property or throw and exception if no such property is defined.
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getString</span><span class="params">(<span name="props">props: <span class="extype" name="java.util.Properties">Properties</span></span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="default">default: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<p class="shortcomment cmt">Get a string property, or, if no such property is defined, return the given default value
</p>
<div class="fullcomment"><div class="comment cmt"><p>Get a string property, or, if no such property is defined, return the given default value
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getTopicFlushIntervals">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getTopicFlushIntervals</span><span class="params">(<span name="allIntervals">allIntervals: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.collection.Map">Map</span>[<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>]</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getTopicPartition">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getTopicPartition</span><span class="params">(<span name="topicPartition">topicPartition: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: (<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>)</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getTopicPartitions">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getTopicPartitions</span><span class="params">(<span name="allPartitions">allPartitions: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.collection.Map">Map</span>[<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>]</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getTopicRentionHours">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getTopicRentionHours</span><span class="params">(<span name="retentionHours">retentionHours: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.collection.Map">Map</span>[<span class="extype" name="java.lang.String">String</span>, <span class="extype" name="scala.Int">Int</span>]</span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#getUnsignedInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getUnsignedInt</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="index">index: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Long">Long</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read an unsigned integer from the given position without modifying the buffers
position</p>
<div class="fullcomment"><div class="comment cmt"><p>Read an unsigned integer from the given position without modifying the buffers
position</p></div><dl class="paramcmts block"><dt class="param">index</dt><dd class="cmt"><p>the index from which to read the integer</p></dd><dt>returns</dt><dd class="cmt"><p>The integer read, as a long to avoid signedness
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#getUnsignedInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">getUnsignedInt</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>)</span><span class="result">: <span class="extype" name="scala.Long">Long</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read an unsigned integer from the current position in the buffer,
incrementing the position by 4 bytes</p>
<div class="fullcomment"><div class="comment cmt"><p>Read an unsigned integer from the current position in the buffer,
incrementing the position by 4 bytes</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>The integer read, as a long to avoid signedness
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#groupby">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">groupby</span><span class="tparams">[<span name="K">K</span>, <span name="V">V</span>]</span><span class="params">(<span name="vals">vals: <span class="extype" name="scala.collection.Iterable">Iterable</span>[V]</span>, <span name="f">f: (V) ⇒ K</span>)</span><span class="result">: <span class="extype" name="scala.collection.Map">Map</span>[K, <span class="extype" name="scala.collection.immutable.List">List</span>[V]]</span>
</span>
</h4>
<p class="shortcomment cmt">Group the given values by keys extracted with the given function
</p>
<div class="fullcomment"><div class="comment cmt"><p>Group the given values by keys extracted with the given function
</p></div>
</div>
</li><li visbl="pub" name="scala.AnyRef#hashCode">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Returns a hash code value for the object.</p>
<div class="fullcomment"><div class="comment cmt"><p>Returns a hash code value for the object.</p><p>The default hashing algorithm is platform dependent.</p><p>Note that it is allowed for two objects to have identical hash codes (<code>o1.hashCode.equals(o2.hashCode)</code>) yet
not be equal (<code>o1.equals(o2)</code> returns <code>false</code>). A degenerate implementation could always return <code>0</code>.
However, it is required that if two objects are equal (<code>o1.equals(o2)</code> returns <code>true</code>) that they have
identical hash codes (<code>o1.hashCode.equals(o2.hashCode)</code>). Therefore, when overriding this method, be sure
to verify that the behavior is consistent with the <code>equals</code> method.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>the hash code value for the object.</p></dd></dl><div class="block">
definition classes: AnyRef → Any
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#hashcode">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">hashcode</span><span class="params">(<span name="as">as: <span class="extype" name="scala.Any">Any</span>*</span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Compute the hash code for the given items
</p>
<div class="fullcomment"><div class="comment cmt"><p>Compute the hash code for the given items
</p></div>
</div>
</li><li visbl="pub" name="scala.Any#isInstanceOf">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt">This method is used to test whether the dynamic type of the receiver object is <code>T0</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p>This method is used to test whether the dynamic type of the receiver object is <code>T0</code>.</p><p>Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression<code>1.isInstanceOf[String]</code> will return <code>false</code>, while the expression <code>List(1).isInstanceOf[List[String]]</code> will
return <code>true</code>. In the latter example, because the type argument is erased as part of compilation it is not
possible to check whether the contents of the list are of the requested typed.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is an instance of erasure of type <code>T0</code>; <code>false</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: Any
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#loadProps">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">loadProps</span><span class="params">(<span name="filename">filename: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.util.Properties">Properties</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read a properties file from the given path</p>
<div class="fullcomment"><div class="comment cmt"><p>Read a properties file from the given path</p></div><dl class="paramcmts block"><dt class="param">filename</dt><dd class="cmt"><p>The path of the file to read
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#loggedRunnable">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">loggedRunnable</span><span class="params">(<span name="fun">fun: () ⇒ <span class="extype" name="scala.Unit">Unit</span></span>)</span><span class="result">: <span class="extype" name="java.lang.Runnable">Runnable</span></span>
</span>
</h4>
<p class="shortcomment cmt">Wrap the given function in a java.</p>
<div class="fullcomment"><div class="comment cmt"><p>Wrap the given function in a java.lang.Runnable that logs any errors encountered</p></div><dl class="paramcmts block"><dt class="param">fun</dt><dd class="cmt"><p>A function</p></dd><dt>returns</dt><dd class="cmt"><p>A Runnable that just executes the function
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#ne">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">ne</span><span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<p class="shortcomment cmt"><code>o.ne(arg0)</code> is the same as <code>!(o.eq(arg0))</code>.</p>
<div class="fullcomment"><div class="comment cmt"><p><code>o.ne(arg0)</code> is the same as <code>!(o.eq(arg0))</code>.
</p></div><dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for reference dis-equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>false</code> if the argument is not a reference to the receiver object; <code>true</code> otherwise.</p></dd></dl><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#newThread">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">newThread</span><span class="params">(<span name="name">name: <span class="extype" name="java.lang.String">String</span></span>, <span name="runnable">runnable: <span class="extype" name="java.lang.Runnable">Runnable</span></span>, <span name="daemon">daemon: <span class="extype" name="scala.Boolean">Boolean</span></span>)</span><span class="result">: <span class="extype" name="java.lang.Thread">Thread</span></span>
</span>
</h4>
<p class="shortcomment cmt">Create a new thread</p>
<div class="fullcomment"><div class="comment cmt"><p>Create a new thread</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>The name of the thread</p></dd><dt class="param">runnable</dt><dd class="cmt"><p>The work for the thread to do</p></dd><dt class="param">daemon</dt><dd class="cmt"><p>Should the thread block JVM shutdown?</p></dd><dt>returns</dt><dd class="cmt"><p>The unstarted thread
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#notNull">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">notNull</span><span class="tparams">[<span name="V">V</span>]</span><span class="params">(<span name="v">v: V</span>)</span><span class="result">: V</span>
</span>
</h4>
</li><li visbl="pub" name="scala.AnyRef#notify">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Wakes up a single thread that is waiting on the receiver object's monitor.</p>
<div class="fullcomment"><div class="comment cmt"><p>Wakes up a single thread that is waiting on the receiver object's monitor.</p></div><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="scala.AnyRef#notifyAll">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Wakes up all threads that are waiting on the receiver object's monitor.</p>
<div class="fullcomment"><div class="comment cmt"><p>Wakes up all threads that are waiting on the receiver object's monitor.</p></div><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#openChannel">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">openChannel</span><span class="params">(<span name="file">file: <span class="extype" name="java.io.File">File</span></span>, <span name="mutable">mutable: <span class="extype" name="scala.Boolean">Boolean</span></span>)</span><span class="result">: <span class="extype" name="java.nio.channels.FileChannel">FileChannel</span></span>
</span>
</h4>
<p class="shortcomment cmt">Open a channel for the given file
</p>
<div class="fullcomment"><div class="comment cmt"><p>Open a channel for the given file
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#propertyExists">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">propertyExists</span><span class="params">(<span name="prop">prop: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#putUnsignedInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">putUnsignedInt</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="index">index: <span class="extype" name="scala.Int">Int</span></span>, <span name="value">value: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Write the given long value as a 4 byte unsigned integer.</p>
<div class="fullcomment"><div class="comment cmt"><p>Write the given long value as a 4 byte unsigned integer. Overflow is ignored.</p></div><dl class="paramcmts block"><dt class="param">buffer</dt><dd class="cmt"><p>The buffer to write to</p></dd><dt class="param">index</dt><dd class="cmt"><p>The position in the buffer at which to begin writing</p></dd><dt class="param">value</dt><dd class="cmt"><p>The value to write
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#putUnsignedInt">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">putUnsignedInt</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="value">value: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Write the given long value as a 4 byte unsigned integer.</p>
<div class="fullcomment"><div class="comment cmt"><p>Write the given long value as a 4 byte unsigned integer. Overflow is ignored.</p></div><dl class="paramcmts block"><dt class="param">buffer</dt><dd class="cmt"><p>The buffer to write to</p></dd><dt class="param">value</dt><dd class="cmt"><p>The value to write
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#read">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">read</span><span class="params">(<span name="channel">channel: <span class="extype" name="java.nio.channels.ReadableByteChannel">ReadableByteChannel</span></span>, <span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read some bytes into the provided buffer, and return the number of bytes read.</p>
<div class="fullcomment"><div class="comment cmt"><p>Read some bytes into the provided buffer, and return the number of bytes read. If the
channel has been closed or we get -1 on the read for any reason, throw an EOFException
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#readBytes">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">readBytes</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="offset">offset: <span class="extype" name="scala.Int">Int</span></span>, <span name="size">size: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Array">Array</span>[<span class="extype" name="scala.Byte">Byte</span>]</span>
</span>
</h4>
<p class="shortcomment cmt">Read a byte array from the given offset and size in the buffer
TODO: Should use System.</p>
<div class="fullcomment"><div class="comment cmt"><p>Read a byte array from the given offset and size in the buffer
TODO: Should use System.arraycopy
</p></div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#readShortString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">readShortString</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="encoding">encoding: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<p class="shortcomment cmt">Read size prefixed string where the size is stored as a 2 byte short.</p>
<div class="fullcomment"><div class="comment cmt"><p>Read size prefixed string where the size is stored as a 2 byte short.</p></div><dl class="paramcmts block"><dt class="param">buffer</dt><dd class="cmt"><p>The buffer to read from</p></dd><dt class="param">encoding</dt><dd class="cmt"><p>The encoding in which to read the string
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#registerMBean">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">registerMBean</span><span class="params">(<span name="mbean">mbean: AnyRef</span>, <span name="name">name: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Register the given mbean with the platform mbean server,
unregistering any mbean that was there before</p>
<div class="fullcomment"><div class="comment cmt"><p>Register the given mbean with the platform mbean server,
unregistering any mbean that was there before</p></div><dl class="paramcmts block"><dt class="param">mbean</dt><dd class="cmt"><p>The object to register as an mbean</p></dd><dt class="param">name</dt><dd class="cmt"><p>The name to register this mbean with
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#rm">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">rm</span><span class="params">(<span name="file">file: <span class="extype" name="java.io.File">File</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Recursively delete the given file/directory and any subfiles (if any exist)</p>
<div class="fullcomment"><div class="comment cmt"><p>Recursively delete the given file/directory and any subfiles (if any exist)</p></div><dl class="paramcmts block"><dt class="param">file</dt><dd class="cmt"><p>The root file at which to begin deleting
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#rm">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">rm</span><span class="params">(<span name="file">file: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Recursively delete the given file/directory and any subfiles (if any exist)</p>
<div class="fullcomment"><div class="comment cmt"><p>Recursively delete the given file/directory and any subfiles (if any exist)</p></div><dl class="paramcmts block"><dt class="param">file</dt><dd class="cmt"><p>The root file at which to begin deleting
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#runnable">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">runnable</span><span class="params">(<span name="fun">fun: () ⇒ <span class="extype" name="scala.Unit">Unit</span></span>)</span><span class="result">: <span class="extype" name="java.lang.Runnable">Runnable</span></span>
</span>
</h4>
<p class="shortcomment cmt">Wrap the given function in a java.</p>
<div class="fullcomment"><div class="comment cmt"><p>Wrap the given function in a java.lang.Runnable</p></div><dl class="paramcmts block"><dt class="param">fun</dt><dd class="cmt"><p>A function</p></dd><dt>returns</dt><dd class="cmt"><p>A Runnable that just executes the function
</p></dd></dl>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#stackTrace">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">stackTrace</span><span class="params">(<span name="e">e: <span class="extype" name="java.lang.Throwable">Throwable</span></span>)</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
</li><li visbl="pub" name="kafka.utils.Utils#swallow">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">swallow</span><span class="params">(<span name="log">log: (AnyRef, <span class="extype" name="java.lang.Throwable">Throwable</span>) ⇒ <span class="extype" name="scala.Unit">Unit</span></span>, <span name="action">action: ⇒ <span class="extype" name="scala.Unit">Unit</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Do the given action and log any exceptions thrown without rethrowing them</p>
<div class="fullcomment"><div class="comment cmt"><p>Do the given action and log any exceptions thrown without rethrowing them</p></div><dl class="paramcmts block"><dt class="param">log</dt><dd class="cmt"><p>The log method to use for logging. E.g. logger.warn</p></dd><dt class="param">action</dt><dd class="cmt"><p>The action to execute
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#synchronized">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: T0</span>)</span><span class="result">: T0</span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="kafka.utils.Utils#toString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">toString</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="encoding">encoding: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<p class="shortcomment cmt">Translate the given buffer into a string</p>
<div class="fullcomment"><div class="comment cmt"><p>Translate the given buffer into a string</p></div><dl class="paramcmts block"><dt class="param">buffer</dt><dd class="cmt"><p>The buffer to translate</p></dd><dt class="param">encoding</dt><dd class="cmt"><p>The encoding to use in translating bytes to characters
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#toString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<p class="shortcomment cmt">Returns a string representation of the object.</p>
<div class="fullcomment"><div class="comment cmt"><p>Returns a string representation of the object.</p><p>The default representation is platform dependent.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>a string representation of the object.</p></dd></dl><div class="block">
definition classes: AnyRef → Any
</div>
</div>
</li><li visbl="pub" name="kafka.utils.Utils#unregisterMBean">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">unregisterMBean</span><span class="params">(<span name="name">name: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Unregister the mbean with the given name, if there is one registered</p>
<div class="fullcomment"><div class="comment cmt"><p>Unregister the mbean with the given name, if there is one registered</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>The mbean name to unregister
</p></dd></dl>
</div>
</li><li visbl="pub" name="scala.AnyRef#wait">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="scala.AnyRef#wait">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="scala.AnyRef#wait">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><div class="block">
attributes: final
</div><div class="block">
definition classes: AnyRef
</div></div>
</li><li visbl="pub" name="kafka.utils.Utils#writeShortString">
<h4 class="signature">
<span class="kind">def</span>
<span class="symbol">
<span class="name">writeShortString</span><span class="params">(<span name="buffer">buffer: <span class="extype" name="java.nio.ByteBuffer">ByteBuffer</span></span>, <span name="string">string: <span class="extype" name="java.lang.String">String</span></span>, <span name="encoding">encoding: <span class="extype" name="java.lang.String">String</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<p class="shortcomment cmt">Write a size prefixed string where the size is stored as a 2 byte short</p>
<div class="fullcomment"><div class="comment cmt"><p>Write a size prefixed string where the size is stored as a 2 byte short</p></div><dl class="paramcmts block"><dt class="param">buffer</dt><dd class="cmt"><p>The buffer to write to</p></dd><dt class="param">string</dt><dd class="cmt"><p>The string to write</p></dd><dt class="param">encoding</dt><dd class="cmt"><p>The encoding in which to write the string
</p></dd></dl>
</div>
</li></ol>
</div>
</div>
<div id="tooltip"></div>
</body>
</html>