Skip to content

Commit

Permalink
Conc updates (#2)
Browse files Browse the repository at this point in the history
* Concurrency updates.

* Concurrency updates.

* Concurrency updates.

* Code cleanup, javadoc update and more concurrency control.

* Code cleanup, javadoc update and more concurrency control.

* Code cleanup, javadoc update and more concurrency control.
  • Loading branch information
gstamatakis authored Jul 20, 2017
1 parent 8584477 commit c55acc3
Show file tree
Hide file tree
Showing 50 changed files with 382 additions and 154 deletions.
5 changes: 3 additions & 2 deletions javadoc/BootStrapNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>BootStrapNode</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -133,6 +133,7 @@ <h2 title="Interface BootStrapNode" class="title">Interface BootStrapNode</h2>
<br>
<pre>public interface <span class="typeNameLabel">BootStrapNode</span>
extends java.rmi.Remote</pre>
<div class="block">Defines the operations of the <a href="BootStrapNodeImpl.html" title="class in &lt;Unnamed&gt;"><code>BootStrapNodeImpl</code></a> such as joins and departures.</div>
</li>
</ul>
</div>
Expand Down
14 changes: 10 additions & 4 deletions javadoc/BootStrapNodeImpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>BootStrapNodeImpl</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -187,7 +187,9 @@ <h3>Field Summary</h3>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNodeImpl.html#maxNodes">maxNodes</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Maximum number of permitted nodes in the Chord Ring</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.ArrayList&lt;java.lang.Integer&gt;</code></td>
Expand All @@ -202,7 +204,9 @@ <h3>Field Summary</h3>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.HashMap&lt;java.lang.Integer,<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNodeImpl.html#nodes">nodes</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Variables to identify the nodes in the Chord Ring</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
Expand Down Expand Up @@ -396,6 +400,7 @@ <h4>m</h4>
<li class="blockList">
<h4>maxNodes</h4>
<pre>private static&nbsp;int maxNodes</pre>
<div class="block">Maximum number of permitted nodes in the Chord Ring</div>
</li>
</ul>
<a name="nodes">
Expand All @@ -405,6 +410,7 @@ <h4>maxNodes</h4>
<li class="blockList">
<h4>nodes</h4>
<pre>private static&nbsp;java.util.HashMap&lt;java.lang.Integer,<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&gt; nodes</pre>
<div class="block">Variables to identify the nodes in the Chord Ring</div>
</li>
</ul>
<a name="noOfNodes">
Expand Down
6 changes: 4 additions & 2 deletions javadoc/ChordNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>ChordNode</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -133,6 +133,8 @@ <h2 title="Interface ChordNode" class="title">Interface ChordNode</h2>
<br>
<pre>public interface <span class="typeNameLabel">ChordNode</span>
extends java.rmi.Remote</pre>
<div class="block">Defines the standard operations as stated in the original Chord paper with methods such as
find_successor and fix_fingers.</div>
</li>
</ul>
</div>
Expand Down
45 changes: 34 additions & 11 deletions javadoc/ChordNodeImpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>ChordNodeImpl</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -153,6 +153,7 @@ <h2 title="Class ChordNodeImpl" class="title">Class ChordNodeImpl</h2>
<pre>public class <span class="typeNameLabel">ChordNodeImpl</span>
extends java.rmi.server.UnicastRemoteObject
implements <a href="ChordNode.html" title="interface in &lt;Unnamed&gt;">ChordNode</a></pre>
<div class="block">The standard chord node of the network,implements the <a href="ChordNode.html" title="interface in &lt;Unnamed&gt;"><code>ChordNode</code></a> interface.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="serialized-form.html#ChordNodeImpl">Serialized Form</a></dd>
Expand Down Expand Up @@ -184,7 +185,9 @@ <h3>Field Summary</h3>
<tr class="rowColor">
<td class="colFirst"><code>private java.util.HashMap&lt;java.lang.Integer,java.util.HashMap&lt;java.lang.String,java.lang.String&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#data">data</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Data store for each Chord Node instance</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private java.util.concurrent.locks.ReentrantReadWriteLock</code></td>
Expand All @@ -194,7 +197,9 @@ <h3>Field Summary</h3>
<tr class="rowColor">
<td class="colFirst"><code>(package private) <a href="FingerTableEntry.html" title="class in &lt;Unnamed&gt;">FingerTableEntry</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#fingertable">fingertable</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Data Structure to store the finger table for the Chord Node</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static int</code></td>
Expand All @@ -214,7 +219,9 @@ <h3>Field Summary</h3>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#IMAGE_STEP">IMAGE_STEP</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">//Slices of each image (see demo part).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static org.apache.log4j.Logger</code></td>
Expand All @@ -224,12 +231,16 @@ <h3>Field Summary</h3>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#m">m</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Number of identifier bits.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#maxNodes">maxNodes</a></span></code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">Maximum number of nodes allowed in this network.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private java.util.ArrayList&lt;java.util.HashMap&lt;java.lang.String,<a href="Result.html" title="class in &lt;Unnamed&gt;">Result</a>&gt;&gt;</code></td>
Expand Down Expand Up @@ -532,7 +543,9 @@ <h3>Method Summary</h3>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>(package private) void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ChordNodeImpl.html#run-Result-">run</a></span>&#8203;(<a href="Result.html" title="class in &lt;Unnamed&gt;">Result</a>&nbsp;result)</code></th>
<td class="colLast">&nbsp;</td>
<td class="colLast">
<div class="block">This function is called after contacting the BootStrap server and obtaining the successor and predecessor nodes to initialize finger table and update other nodes after joining.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
Expand Down Expand Up @@ -626,6 +639,7 @@ <h3>Field Detail</h3>
<li class="blockList">
<h4>m</h4>
<pre>private static&nbsp;int m</pre>
<div class="block">Number of identifier bits.</div>
</li>
</ul>
<a name="IMAGE_STEP">
Expand All @@ -635,6 +649,7 @@ <h4>m</h4>
<li class="blockList">
<h4>IMAGE_STEP</h4>
<pre>private static final&nbsp;int IMAGE_STEP</pre>
<div class="block">//Slices of each image (see demo part).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="constant-values.html#ChordNodeImpl.IMAGE_STEP">Constant Field Values</a></dd>
Expand Down Expand Up @@ -687,6 +702,7 @@ <h4>serialVersionUID</h4>
<li class="blockList">
<h4>maxNodes</h4>
<pre>private static&nbsp;int maxNodes</pre>
<div class="block">Maximum number of nodes allowed in this network.</div>
</li>
</ul>
<a name="bootstrap">
Expand All @@ -713,7 +729,7 @@ <h4>num</h4>
<ul class="blockList">
<li class="blockList">
<h4>fingerTableSize</h4>
<pre>private static&nbsp;int fingerTableSize</pre>
<pre>private static volatile&nbsp;int fingerTableSize</pre>
</li>
</ul>
<a name="fix_finger_count">
Expand All @@ -722,7 +738,7 @@ <h4>fingerTableSize</h4>
<ul class="blockList">
<li class="blockList">
<h4>fix_finger_count</h4>
<pre>private static&nbsp;int fix_finger_count</pre>
<pre>private static volatile&nbsp;int fix_finger_count</pre>
</li>
</ul>
<a name="timerStabilize">
Expand Down Expand Up @@ -759,6 +775,7 @@ <h4>log</h4>
<li class="blockList">
<h4>data</h4>
<pre>private&nbsp;java.util.HashMap&lt;java.lang.Integer,java.util.HashMap&lt;java.lang.String,java.lang.String&gt;&gt; data</pre>
<div class="block">Data store for each Chord Node instance</div>
</li>
</ul>
<a name="node">
Expand All @@ -776,7 +793,8 @@ <h4>node</h4>
<ul class="blockList">
<li class="blockList">
<h4>fingertable</h4>
<pre><a href="FingerTableEntry.html" title="class in &lt;Unnamed&gt;">FingerTableEntry</a>[] fingertable</pre>
<pre>transient&nbsp;<a href="FingerTableEntry.html" title="class in &lt;Unnamed&gt;">FingerTableEntry</a>[] fingertable</pre>
<div class="block">Data Structure to store the finger table for the Chord Node</div>
</li>
</ul>
<a name="predecessor">
Expand Down Expand Up @@ -1166,6 +1184,11 @@ <h4>fix_fingers</h4>
<li class="blockList">
<h4>run</h4>
<pre>void&nbsp;run&#8203;(<a href="Result.html" title="class in &lt;Unnamed&gt;">Result</a>&nbsp;result)</pre>
<div class="block">This function is called after contacting the BootStrap server and obtaining the successor and predecessor nodes to initialize finger table and update other nodes after joining.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>result</code> - Result object to assist in metrics collection</dd>
</dl>
</li>
</ul>
<a name="get_predecessor--">
Expand Down
9 changes: 5 additions & 4 deletions javadoc/ChordNodeImplTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>ChordNodeImplTest</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -131,8 +131,9 @@ <h2 title="Class ChordNodeImplTest" class="title">Class ChordNodeImplTest</h2>
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">ChordNodeImplTest</span>
<pre>class <span class="typeNameLabel">ChordNodeImplTest</span>
extends java.lang.Object</pre>
<div class="block">Basic test suite with CRUD operations.Run by <a href="MyTestRunner.html" title="class in &lt;Unnamed&gt;"><code>MyTestRunner</code></a>.</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -282,7 +283,7 @@ <h3>Constructor Detail</h3>
<ul class="blockListLast">
<li class="blockList">
<h4>ChordNodeImplTest</h4>
<pre>public&nbsp;ChordNodeImplTest&#8203;()</pre>
<pre>ChordNodeImplTest&#8203;()</pre>
</li>
</ul>
</li>
Expand Down
5 changes: 3 additions & 2 deletions javadoc/FingerTableEntry.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>FingerTableEntry</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -133,6 +133,7 @@ <h2 title="Class FingerTableEntry" class="title">Class FingerTableEntry</h2>
<br>
<pre>public class <span class="typeNameLabel">FingerTableEntry</span>
extends java.lang.Object</pre>
<div class="block">Used to represent contents of the finger table used by each <a href="ChordNodeImpl.html" title="class in &lt;Unnamed&gt;"><code>ChordNodeImpl</code></a>.</div>
</li>
</ul>
</div>
Expand Down
24 changes: 21 additions & 3 deletions javadoc/ImageCanvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:44 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>ImageCanvas</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -169,6 +169,11 @@ <h3>Field Summary</h3>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ImageCanvas.html#images">images</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ImageCanvas.html#serialVersionUID">serialVersionUID</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
Expand Down Expand Up @@ -244,12 +249,25 @@ <h3>Field Detail</h3>
<a name="images">
<!-- -->
</a>
<ul class="blockListLast">
<ul class="blockList">
<li class="blockList">
<h4>images</h4>
<pre>transient&nbsp;java.util.List&lt;java.awt.image.BufferedImage&gt; images</pre>
</li>
</ul>
<a name="serialVersionUID">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>serialVersionUID</h4>
<pre>public static final&nbsp;long serialVersionUID</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="constant-values.html#ImageCanvas.serialVersionUID">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
Expand Down
5 changes: 3 additions & 2 deletions javadoc/MyTestRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:44 EEST 2017 -->
<!-- Generated by javadoc (9) on Thu Jul 20 15:36:12 EEST 2017 -->
<title>MyTestRunner</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
Expand Down Expand Up @@ -133,6 +133,7 @@ <h2 title="Class MyTestRunner" class="title">Class MyTestRunner</h2>
<br>
<pre>public class <span class="typeNameLabel">MyTestRunner</span>
extends java.lang.Object</pre>
<div class="block">The test runner used to run the <a href="ChordNodeImplTest.html" title="class in &lt;Unnamed&gt;"><code>ChordNodeImplTest</code></a>.</div>
</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit c55acc3

Please sign in to comment.