Renamed the test package to simulations

Created a simulations interface
This commit is contained in:
Joshua Kissoon 2014-05-19 12:58:44 +05:30
parent a9e5402697
commit b594b91adf
14 changed files with 36 additions and 27 deletions

View File

@ -1,4 +1,5 @@
# What's left to add to the implementation
1. Implement the "Optimized Contact Accounting" features as mentioned in the paper
2. Implement the "Accelerated Lookups" featured as described in the paper
2. Implement the "Accelerated Lookups" featured as described in the paper
3. Add a setup file on how to setup Kademlia and run it.

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.util.Timer;
import java.util.TimerTask;
@ -13,10 +13,11 @@ import kademlia.node.KademliaId;
* @author Joshua Kissoon
* @since 20140309
*/
public class AutoRefreshOperationTest
public class AutoRefreshOperation implements Simulation
{
public AutoRefreshOperationTest()
@Override
public void runSimulation()
{
try
{
@ -79,9 +80,4 @@ public class AutoRefreshOperationTest
e.printStackTrace();
}
}
public static void main(String[] args)
{
new AutoRefreshOperationTest();
}
}

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.util.Timer;
import java.util.TimerTask;
@ -13,10 +13,11 @@ import kademlia.node.KademliaId;
* @author Joshua Kissoon
* @since 20140309
*/
public class AutoRefreshOperationTest2
public class AutoRefreshOperation2 implements Simulation
{
public AutoRefreshOperationTest2()
@Override
public void runSimulation()
{
try
{
@ -68,9 +69,4 @@ public class AutoRefreshOperationTest2
e.printStackTrace();
}
}
public static void main(String[] args)
{
new AutoRefreshOperationTest2();
}
}

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import kademlia.dht.GetParameter;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import com.google.gson.Gson;
import kademlia.dht.KadContent;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import kademlia.KademliaNode;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import kademlia.dht.GetParameter;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import kademlia.KademliaNode;
import kademlia.node.KademliaId;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import java.util.Scanner;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import kademlia.KademliaNode;
import kademlia.node.KademliaId;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import kademlia.KademliaNode;
import kademlia.dht.GetParameter;

View File

@ -1,4 +1,4 @@
package kademlia.tests;
package kademlia.simulations;
import java.io.IOException;
import kademlia.KademliaNode;

View File

@ -0,0 +1,16 @@
package kademlia.simulations;
/**
* A class that specifies the structure for simulations.
*
* @author Joshua Kissoon
* @since
*/
public interface Simulation
{
/**
* Calling this method runs the simulation
*/
public void runSimulation();
}