Use request client builder
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 11 Nov 2016 06:22:58 +0000 (07:22 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 11 Nov 2016 07:10:01 +0000 (08:10 +0100)
src/main/java/net/pterodactylus/sone/core/FreenetInterface.java

index a06b5b0..9b061c2 100644 (file)
@@ -61,6 +61,7 @@ import freenet.keys.InsertableClientSSK;
 import freenet.keys.USK;
 import freenet.node.Node;
 import freenet.node.RequestClient;
+import freenet.node.RequestClientBuilder;
 import freenet.node.RequestStarter;
 import freenet.support.api.Bucket;
 import freenet.support.api.RandomAccessBucket;
@@ -93,17 +94,7 @@ public class FreenetInterface {
        /** The not-Sone-related USK callbacks. */
        private final Map<FreenetURI, USKCallback> uriUskCallbacks = Collections.synchronizedMap(new HashMap<FreenetURI, USKCallback>());
 
-       private final RequestClient imageInserts = new RequestClient() {
-               @Override
-               public boolean persistent() {
-                       return false;
-               }
-
-               @Override
-               public boolean realTimeFlag() {
-                       return true;
-               }
-       };
+       private final RequestClient imageInserts = new RequestClientBuilder().realTime().build();
 
        /**
         * Creates a new Freenet interface.