mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-22 02:02:21 +00:00
Renamed the test package to simulations
Created a simulations interface
This commit is contained in:
parent
a9e5402697
commit
b594b91adf
@ -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.
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import kademlia.dht.GetParameter;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import kademlia.dht.KadContent;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import kademlia.KademliaNode;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import kademlia.dht.GetParameter;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import kademlia.KademliaNode;
|
||||
import kademlia.node.KademliaId;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Scanner;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import kademlia.KademliaNode;
|
||||
import kademlia.node.KademliaId;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import kademlia.KademliaNode;
|
||||
import kademlia.dht.GetParameter;
|
@ -1,4 +1,4 @@
|
||||
package kademlia.tests;
|
||||
package kademlia.simulations;
|
||||
|
||||
import java.io.IOException;
|
||||
import kademlia.KademliaNode;
|
16
src/kademlia/simulations/Simulation.java
Normal file
16
src/kademlia/simulations/Simulation.java
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user