if(debug) { debugger=new Debugger((JChannel)((ReplicatedHashtable)ht).getChannel()); }
    public static void main(String[] args) {	Hashtable            ht;	int                  i;	byte[]               buf;	boolean              use_replicated_hashtable=false, debug=false;	Debugger             debugger=null;	/*	String props="UDP(mcast_addr=224.0.0.36;mcast_port=55566;ip_ttl=32;" +	    "mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" +	    "PING(timeout=2000;num_initial_members=3):" +	    "MERGE2(min_interval=5000;max_interval=10000):" +	    "FD_SOCK:" +	    "VERIFY_SUSPECT(timeout=1500):" +	    "pbcast.STABLE(desired_avg_gossip=20000):" +	    "pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):" +	    "UNICAST(timeout=5000):" +	    "FRAG(frag_size=16000;down_thread=false;up_thread=false):" +	    "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +	    "shun=false;print_local_addr=true):" +	    "pbcast.STATE_TRANSFER";	    // "PERF(details=true)";	*/		String props="UDP(mcast_addr=224.0.0.36;mcast_port=55566;ip_ttl=32;" +            "mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" +            "PING(timeout=2000;num_initial_members=3):" +            "MERGE2(min_interval=5000;max_interval=10000):" +            "FD_SOCK:" +            "VERIFY_SUSPECT(timeout=1500):" +            "pbcast.NAKACK(gc_lag=50;retransmit_timeout=600,1200,2400,4800):" +            "UNICAST(timeout=5000):" +            "pbcast.STABLE(desired_avg_gossip=20000):" +            "FRAG(frag_size=16000;down_thread=false;up_thread=false):" +            "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +            "shun=false;print_local_addr=true):" +            "pbcast.STATE_TRANSFER";        // "PERF(details=true)";			/*	String props="UDP(mcast_addr=224.0.0.35;mcast_port=45566;ip_ttl=32;" +	    "mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" +	    //"PIGGYBACK:" +	    "PING(timeout=2000;num_initial_members=5):" +	    "FD_SOCK:" +	    "VERIFY_SUSPECT(timeout=1500):" +	    "UNICAST(timeout=5000):" +	    "FRAG(frag_size=4096;down_thread=false;up_thread=false):" +	    "TOTAL_TOKEN(block_sending=1000;unblock_sending=200):" +	    "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +	    "shun=false;print_local_addr=true)";	*/		for(i=0; i < args.length; i++) {	    if("-help".equals(args[i])) {		help();		return;	    }	    if("-use_rht".equals(args[i])) {		use_replicated_hashtable=true;		continue;	    }	    if("-props".equals(args[i])) {		props=args[++i];		continue;	    }	    if("-debug".equals(args[i])) {		debug=true;	    }	}			try {	    if(use_replicated_hashtable) {		ht=new ReplicatedHashtable("HashtableTest", new JChannelFactory(), props, 1000);		if(debug) {		    debugger=new Debugger((JChannel)((ReplicatedHashtable)ht).getChannel());		}		((ReplicatedHashtable)ht).addNotifier(new Notifier(NUM_ITEMS));	    }	    else {		ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, 1000);		if(debug) {		    debugger=new Debugger((JChannel)((DistributedHashtable)ht).getChannel());		}		// ((DistributedHashtable)ht).addNotifier(new MyNotifier());	    }	    if(debugger != null)		debugger.start();	    	    System.out.println("Hashtable already has " + ht.size() + " items");	    System.out.print("Press key to insert " + NUM_ITEMS + " 1k items into DistributedHashtable");	    System.in.read();	    buf=new byte[1024];	    for(i=0; i < buf.length; i++)		buf[i]=(byte)'x';	    start=System.currentTimeMillis();	    for(i=1; i <= NUM_ITEMS; i++) {		ht.put(new Integer(i), buf);		if(i % 100 == 0)		    System.out.println(i); // will slow down insertion	    }	    stop=System.currentTimeMillis();	    System.out.println(i + " elements took " + (stop - start) + " msecs to " +			       (use_replicated_hashtable? "send" : "insert"));	    while(true) {		System.out.println("Hashtable has " + ht.size() + " entries");		System.in.read();	    }	}	catch(Exception ex) {	    System.err.println(ex);	}    }