From: adash Date: Fri, 20 Feb 2009 20:19:36 +0000 (+0000) Subject: new files...still need work X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2ccfe0fb1e158ba704f33b4534c187c48d5544a4;p=IRC.git new files...still need work --- diff --git a/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpServer.java b/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpServer.java new file mode 100644 index 00000000..543ffccb --- /dev/null +++ b/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpServer.java @@ -0,0 +1,19 @@ +public class LookUpServer extends Thread { + public LookUpServer(Socket s) { + + } + + public void run() { + //Do lookup + //Do update + } + + public void doHashLookUp() { + + + } + + public void updateHash() { + + } +} diff --git a/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpService.java b/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpService.java new file mode 100644 index 00000000..f35c4522 --- /dev/null +++ b/Robust/src/Benchmarks/Distributed/LookUpService/java/LookUpService.java @@ -0,0 +1,60 @@ +public class LookUpService { + public static int main(String arg[]) { + /** + * The initial capacity of hashmap + **/ + int initCapacity = 100; + + /** + * The second capacity of hashmap + **/ + int secondCapacity = 100; + + /** + * The loadFactor + **/ + float loadFactor = 0.75f; + + /** + * Number of threads + **/ + int nthreads = 1; + + /** + * Number of objects in the hash table + **/ + int nobjs = 110; + + /** + * Create shared hashmap and put values + **/ + DistributedHashMap dhmap; + dhmap = new DistributedHashMap(initCapacity,secondCapacity,loadFactor) + for(int i = 0; i