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(); }
private void store(String key, String val) throws IOException { peer.put(Number160.createHash(key), new Data(val)).awaitUninterruptibly(); }
private void store(Number160 key, String[] vals) throws IOException { peer.put(key, new Data(vals)).awaitUninterruptibly(); }