Package net.tomp2p.dht

Examples of net.tomp2p.dht.StorageMemory


        // Random rnd=new Random(42L);
      PeerDHT master = null;
      PeerDHT slave = null;
        ChannelCreator cc = null;
        try {
          StorageMemory s1 = new StorageMemory();
          master = new PeerBuilderDHT(new PeerBuilder(new Number160("0xee")).start()).storage(s1).start();
          IndirectReplication im = new IndirectReplication(master);
         
           
            final AtomicInteger test1 = new AtomicInteger(0);
View Full Code Here


            Number160 loc = new Number160(rnd);
            Map<Number160, Data> contentMap = new HashMap<Number160, Data>();
            contentMap.put(Number160.ZERO, new Data("string"));
            final AtomicInteger test1 = new AtomicInteger(0);
            final AtomicInteger test2 = new AtomicInteger(0);
            StorageMemory s1 = new StorageMemory();
            master = new PeerBuilderDHT(new PeerBuilder(new Number160(rnd)).ports(port).start()).storage(s1).start();
            IndirectReplication im = new IndirectReplication(master);
            System.err.println("master is " + master.peerAddress());

            ResponsibilityListener responsibilityListener = new ResponsibilityListener() {
View Full Code Here

    List<PeerDHT> peers = new ArrayList<PeerDHT>(joins.length);
    IndirectReplication ind = null;
    ChannelCreator cc = null;
    try {
      char[] letters = { 'a', 'b', 'c', 'd' };
      StorageMemory storage = new StorageMemory();
      for (int i = 0; i < joins.length; i++) {
        if(i == 0) {
          PeerDHT peer = new PeerBuilderDHT(new PeerBuilder(new Number160("0x" + letters[i])).ports(Ports.DEFAULT_PORT + i)
              .start()).storage(storage).start();
          ind = new IndirectReplication(peer).replicationFactor(replicationFactor).nRoot(nRoot).start();
View Full Code Here

TOP

Related Classes of net.tomp2p.dht.StorageMemory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.