Exemplo n.º 1
0
 private FutureDHT put(String key, String domain, String content, String data)
     throws IOException {
   Number160 locationKey = Number160.createHash(key);
   Number160 domainKey = Number160.createHash(domain);
   Number160 contentKey = Number160.createHash(content);
   MyData myData = new MyData();
   myData.setKey(key);
   myData.setDomain(domain);
   myData.setContent(content);
   myData.setData(data);
   return peer.put(locationKey)
       .setDomainKey(domainKey)
       .setData(contentKey, new Data(myData))
       .start();
 }
Exemplo n.º 2
0
 private void store(String key, String val) throws IOException {
   peer.put(Number160.createHash(key), new Data(val)).awaitUninterruptibly();
 }
Exemplo n.º 3
0
 private void store(Number160 key, String[] vals) throws IOException {
   peer.put(key, new Data(vals)).awaitUninterruptibly();
 }