Skip to content

Commit

Permalink
Java9 migration (#1)
Browse files Browse the repository at this point in the history
* Java 9 support added.

* Java 9 support added.
  • Loading branch information
gstamatakis authored Jul 19, 2017
1 parent 5de652f commit 8584477
Show file tree
Hide file tree
Showing 54 changed files with 2,465 additions and 953 deletions.
4 changes: 2 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ChordDHT.iml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.0.0-M4" level="project" />
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.0.0-M2" level="project" />
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.0.0-M4" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.0.0-M6" level="project" />
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.0.0-M3" level="project" />
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.0.0-M6" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
</component>
</module>
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
###Author
Giorgos Stamatakis

##Summary
###Tools Required

Apache Maven

Java 8+ (Added java9 support)

Docker, if the deployment method is a docker swarm.

###Summary
This is a distributed dictionary that can save Key-Value pairs in a network of nodes.
The network implements a Chord-like logic using java RMI for RPC. Maven is used to build the fat
JARs required in order to run the project. The project consists of 2 JARs that need to be built, the
Expand Down
89 changes: 63 additions & 26 deletions javadoc/BootStrapNode.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_131) on Wed Jun 28 16:46:15 EEST 2017 -->
<!-- Generated by javadoc (9) on Wed Jul 19 20:35:43 EEST 2017 -->
<title>BootStrapNode</title>
<meta name="date" content="2017-06-28">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2017-07-19">
<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>
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
Expand All @@ -24,10 +33,11 @@
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
var pathtoroot = "./";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
Expand Down Expand Up @@ -57,6 +67,12 @@
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><span>SEARCH:&nbsp;</span>
<input type="text" id="search" value=" " disabled="disabled">
<input type="reset" id="reset" value=" " disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
Expand All @@ -68,6 +84,9 @@
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
Expand All @@ -88,6 +107,12 @@
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<h2 title="Interface BootStrapNode" class="title">Interface BootStrapNode</h2>
Expand All @@ -98,11 +123,11 @@ <h2 title="Interface BootStrapNode" class="title">Interface BootStrapNode</h2>
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>java.rmi.Remote</dd>
<dd><code>java.rmi.Remote</code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="BootStrapNodeImpl.html" title="class in &lt;Unnamed&gt;">BootStrapNodeImpl</a></dd>
<dd><code><a href="BootStrapNodeImpl.html" title="class in &lt;Unnamed&gt;">BootStrapNodeImpl</a></code></dd>
</dl>
<hr>
<br>
Expand All @@ -120,60 +145,69 @@ <h2 title="Interface BootStrapNode" class="title">Interface BootStrapNode</h2>
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<table class="memberSummary" 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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#acknowledgeNodeJoin-int-">acknowledgeNodeJoin</a></span>(int&nbsp;nodeID)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#acknowledgeNodeJoin-int-">acknowledgeNodeJoin</a></span>&#8203;(int&nbsp;nodeID)</code></th>
<td class="colLast">
<div class="block">This function is called when a Chord Node has successfully joined the Chord ring</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.ArrayList&lt;<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#addNodeToRing-java.lang.String-java.lang.String-">addNodeToRing</a></span>(java.lang.String&nbsp;ipaddress,
java.lang.String&nbsp;port)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#addNodeToRing-java.lang.String-java.lang.String-">addNodeToRing</a></span>&#8203;(java.lang.String&nbsp;ipaddress,
java.lang.String&nbsp;port)</code></th>
<td class="colLast">
<div class="block">This function will be called by any Chord Node that wishes to join the network.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#displayNodesInRing--">displayNodesInRing</a></span>()</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#displayNodesInRing--">displayNodesInRing</a></span>&#8203;()</code></th>
<td class="colLast">
<div class="block">This function displays the details of the Chord Nodes in the ring</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#findNewSuccessor-NodeInfo-NodeInfo-">findNewSuccessor</a></span>(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n,
<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;dead_node)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#findNewSuccessor-NodeInfo-NodeInfo-">findNewSuccessor</a></span>&#8203;(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n,
<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;dead_node)</code></th>
<td class="colLast">
<div class="block">This function finds the new successor node if the current successor node is found to be dead or has crashed.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#generate_ID-java.lang.String-int-">generate_ID</a></span>(java.lang.String&nbsp;key,
int&nbsp;maxNodes)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#generate_ID-java.lang.String-int-">generate_ID</a></span>&#8203;(java.lang.String&nbsp;key,
int&nbsp;maxNodes)</code></th>
<td class="colLast">
<div class="block">The function generates a unique identifier for the Chord Node instance using SHA-1 algorithm</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#getNodesInRing--">getNodesInRing</a></span>()</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#getNodesInRing--">getNodesInRing</a></span>&#8203;()</code></th>
<td class="colLast">
<div class="block">This function returns the number of nodes currently in the ring</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#isZoneFilled-int-">isZoneFilled</a></span>(int&nbsp;zoneID)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#isZoneFilled-int-">isZoneFilled</a></span>&#8203;(int&nbsp;zoneID)</code></th>
<td class="colLast">
<div class="block">This function checks if a particular zone of the Chord ring is full ,i.e.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="BootStrapNode.html#removeNodeFromRing-NodeInfo-">removeNodeFromRing</a></span>(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n)</code>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="BootStrapNode.html#removeNodeFromRing-NodeInfo-">removeNodeFromRing</a></span>&#8203;(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n)</code></th>
<td class="colLast">
<div class="block">This function is called when a Chord Node leaves the ring or is found to be dead.</div>
</td>
</tr>
Expand All @@ -198,7 +232,7 @@ <h3>Method Detail</h3>
<ul class="blockList">
<li class="blockList">
<h4>addNodeToRing</h4>
<pre>java.util.ArrayList&lt;<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&gt;&nbsp;addNodeToRing(java.lang.String&nbsp;ipaddress,
<pre>java.util.ArrayList&lt;<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&gt;&nbsp;addNodeToRing&#8203;(java.lang.String&nbsp;ipaddress,
java.lang.String&nbsp;port)
throws java.rmi.RemoteException</pre>
<div class="block">This function will be called by any Chord Node that wishes to join the network. The main objective of this
Expand All @@ -222,7 +256,7 @@ <h4>addNodeToRing</h4>
<ul class="blockList">
<li class="blockList">
<h4>removeNodeFromRing</h4>
<pre>void&nbsp;removeNodeFromRing(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n)
<pre>void&nbsp;removeNodeFromRing&#8203;(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n)
throws java.rmi.RemoteException</pre>
<div class="block">This function is called when a Chord Node leaves the ring or is found to be dead.</div>
<dl>
Expand All @@ -239,7 +273,7 @@ <h4>removeNodeFromRing</h4>
<ul class="blockList">
<li class="blockList">
<h4>acknowledgeNodeJoin</h4>
<pre>void&nbsp;acknowledgeNodeJoin(int&nbsp;nodeID)
<pre>void&nbsp;acknowledgeNodeJoin&#8203;(int&nbsp;nodeID)
throws java.rmi.RemoteException</pre>
<div class="block">This function is called when a Chord Node has successfully joined the Chord ring</div>
<dl>
Expand All @@ -256,7 +290,7 @@ <h4>acknowledgeNodeJoin</h4>
<ul class="blockList">
<li class="blockList">
<h4>displayNodesInRing</h4>
<pre>void&nbsp;displayNodesInRing()
<pre>void&nbsp;displayNodesInRing&#8203;()
throws java.rmi.RemoteException</pre>
<div class="block">This function displays the details of the Chord Nodes in the ring</div>
<dl>
Expand All @@ -271,7 +305,7 @@ <h4>displayNodesInRing</h4>
<ul class="blockList">
<li class="blockList">
<h4>getNodesInRing</h4>
<pre>int&nbsp;getNodesInRing()
<pre>int&nbsp;getNodesInRing&#8203;()
throws java.rmi.RemoteException</pre>
<div class="block">This function returns the number of nodes currently in the ring</div>
<dl>
Expand All @@ -288,7 +322,7 @@ <h4>getNodesInRing</h4>
<ul class="blockList">
<li class="blockList">
<h4>generate_ID</h4>
<pre>int&nbsp;generate_ID(java.lang.String&nbsp;key,
<pre>int&nbsp;generate_ID&#8203;(java.lang.String&nbsp;key,
int&nbsp;maxNodes)
throws java.rmi.RemoteException,
java.security.NoSuchAlgorithmException</pre>
Expand All @@ -311,7 +345,7 @@ <h4>generate_ID</h4>
<ul class="blockList">
<li class="blockList">
<h4>isZoneFilled</h4>
<pre>boolean&nbsp;isZoneFilled(int&nbsp;zoneID)
<pre>boolean&nbsp;isZoneFilled&#8203;(int&nbsp;zoneID)
throws java.rmi.RemoteException</pre>
<div class="block">This function checks if a particular zone of the Chord ring is full ,i.e. all the slots are occupied by CHord Node instances</div>
<dl>
Expand All @@ -330,7 +364,7 @@ <h4>isZoneFilled</h4>
<ul class="blockListLast">
<li class="blockList">
<h4>findNewSuccessor</h4>
<pre><a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;findNewSuccessor(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n,
<pre><a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;findNewSuccessor&#8203;(<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;n,
<a href="NodeInfo.html" title="class in &lt;Unnamed&gt;">NodeInfo</a>&nbsp;dead_node)
throws java.rmi.RemoteException</pre>
<div class="block">This function finds the new successor node if the current successor node is found to be dead or has crashed.</div>
Expand Down Expand Up @@ -392,6 +426,9 @@ <h4>findNewSuccessor</h4>
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
Expand Down
Loading

0 comments on commit 8584477

Please sign in to comment.